DESIGN Outside main class:
- Create a List Array of type String
- 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.
- A separate class to implement compilation of a java file (.java) and creating a compiled file in the same directory
- A separate class to run the compiled file and store the output in a file.
In main class:
- User Interface: Console-based interface with the ">>>" prompt. Accepts user input for Java code snippets.
- Input Processing: Parse and analyze user input. Append all the statements onto a file (.java)
- Interpreter Engine: Compile the java file before running. Run the compiled java file and store the output in a file.
- Output Display: Show results or errors based on the executed code.
- Error Handling: Implement mechanisms to handle syntax errors, runtime exceptions, etc.
FLOWCHART
OUTPUT SCREENSHOTS




