Skip to content

Manushivuz/Java-Interactive-Interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

DESIGN Outside main class:

  1. Create a List Array of type String
  2. Assuming the user entry won’t exceed 100 lines before “exe” as input, set initial index of string to a class name(same as java file name) followed by a main function , set all other indices upto 99 as “ ” set 100 and 101 to “}” to end the main method block and class.
  3. A separate class to implement compilation of a java file (.java) and creating a compiled file in the same directory
  4. A separate class to run the compiled file and store the output in a file.

In main class:

  1. User Interface: Console-based interface with the ">>>" prompt. Accepts user input for Java code snippets.
  2. Input Processing: Parse and analyze user input. Append all the statements onto a file (.java)
  3. Interpreter Engine: Compile the java file before running. Run the compiled java file and store the output in a file.
  4. Output Display: Show results or errors based on the executed code.
  5. Error Handling: Implement mechanisms to handle syntax errors, runtime exceptions, etc.

FLOWCHART

image

OUTPUT SCREENSHOTS

image image image image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages