Due date: see Oncourse Modules or Assignments
50 points
if/else statement.In Lab 3, you developed one of the following programs:
This program had a console-based, text user interface.
Modify the program (or a copy of the program) to give it a graphical user interface (GUI).
Your GUI must have these components:
You should be able to enter new data and have your program compute and display results for as many times as the first button is clicked, and quit when the second button is clicked.
Prerequisite: Chapters 1–4, including GUI material.
Build the graphical user interface. It needs the components listed above.
result, call result.setEditable(false) so the user cannot enter text in it. You can use result.setText("text") to change what it displays, the same as a JLabel. A JTextField may be less pretty than a JLabel, but its width is more stable.actionPerformed method only has to deal with this case. Use the “X” window close control to quit from the program.Prerequisite: Sections 5.1–5.2 (if statement) and 5.7 (determining event sources).
actionPerformed method, using an if/else statement to discriminate between the two possible event sources (the compute and quit buttons).
System.exit(0).Read Unix Tutorial Six: Other Useful Unix Commands and try out the commands as suggested there, or in other ways.
Quotas are not implemented on merlin, so the quota command will give you no output.
Run the file command on the files in your project (i.e., for this lab—Java source and class files, screenshot files, etc.). Capture the output and turn it in as a text file (preferred) or screenshot.
Turn in, as attachments in Oncourse Assignments:
file command.file commandThe Coding Standards for chapters 1–6 apply to this assignment.