This assignment is a combination of the two lab assignments. You are a week behind in the…

This assignment is a combination of the two lab assignments. You are a week behind in the lab. So I combined the two lab assignments into one homework assignment. Part 1: Create the GUI Window for user Interaction 1. The root node of the GUI is a BorderPane. 2. On the top of the GUI is the TextField to show the math expression that you enter. 3. The TextField is put in an HBox. 4. On the right is the equals sign button. This button is put in a VBox. 5. On the left is a VBox that contains all basic mathematical operations, +, -, *, and /. 6. You also create buttons for each of these operations and add then to the VBox. This VBox is different from the one you created for the equals button. 7. Next use a GridPane to create all the number buttons, the Clear Button (”C”), the Exit button(”E”), the Memory Button(”M”), and the Recall Button(”R”). 8. The clear button should clear the TextField and reset other variables to null or zero based on the variable type, the exit button (”E”) quits the program, the memory button stores the result of the last operation and the recall button recalls the stored result without any change. Part 2: Algorithm for a Line calculator 1. Your text book has a case study of a line-oriented calculator in chapter 9. Please study that and also use your computer’s built-in calculator as an example of what is required. 2. Your book gives a complete program without a GUI that shows how to write this code. 3. Your job is to combine that code with a GUI implementation. 4. There are many ways to write the program. 5. This calculator, doesn’t follow precedence rules etc. That’s fine. 6. Your goal is to use the book’s program and the GUI together so that you achieve the same result by clicking on buttons. 7. This program will help you to write event driven programming code using different layout panes.

Leave a Comment

Your email address will not be published. Required fields are marked *