5/5 – (1 vote)
In this assignment, you will write a user interface for your calculator using JavaFX. Your graphical user interface (GUI) should look like the screenshot below (creativity is good, but you also need to be able to design to customer specifications). When the user closes the window, the program should end. For this assignment the GUI does not need to respond to any other user input. Note that we are developing this GUI completely separately from any class. This is a common design pattern that is often called ModelView-Controller, or MVC. The model is the data your program deals with, the view is the user interface, and the controller responds to input from the view by acting on the data in the model. Developing programs in this way allows you to create different user interfaces (e.g. desktop, web-based, mobile phone) without modifying the rest of your program.
Sample output:
You will be graded according to the following rubric (each item is worth one point):
A window is displayed in the center of the screen when the program begins. The window has the title Calculator
Closing the window ends the program
There is a text field at the top of the window with an initial value of 0.0; this value cannot be changed (call the setEditable(false) method on the instance of the TextField class)
There are keys for all of the digits and operators in the center of the window
There is an equals button stretched along the entire bottom of the window
The layout of the components within the window is the same as in the screenshot above
The text shown in the text field is bold and in 20 point mono-spaced font
Your program compiles
Your program runs
You follow standard coding conventions (e.g. variable names, indentation, comments, etc.)
Note: If your program does not compile, you will receive a score of 0 on the entire assignment
Note: If you program compiles but does not run, you will receive a score of 0 on the entire assignment
Note: I your Eclipse project is not exported correctly, you will receive a score of 0 on the entire assignment
Reviews
There are no reviews yet.