STEP 1: InheritanceTest (20 points)
Write a program called [url removed, login to view] to support an inheritance hierarchy for class Point–Square–Cube. Use Point as the superclass of the hierarchy. Specify the instance variables and methods for each class. The private data of Point should be the x-y coordinates, the private data of Square should be the sideLength, the private data of Cube should be depth. Provide applicable accessor methods, mutator methods, toString() methods, area() method and volume() method to all classes. Write a program that instantiates objects of your classes, test all instance methods and outputs each object's area and volume when appropriate.
STEP 2: DayGui (10 points)
Write a program called [url removed, login to view] that creates a GUI having the following properties:
Add individual event handlers to the your program so that when a user clicks the Good button, the message Today is a good day! appears in a dialog box, and when the Bad button is clicked, the message I'm having a bad day today! is displayed. The following tutorial shows you much of the code solution. Feel free to use the tutorial, but make changes so that it you are not simply copying the tutorial code for your entire solution.
[url removed, login to view] tutorial
3:13, [url removed, login to view]
STEP 3: OfficeAreaCalculator (10 points)
Write a program called [url removed, login to view] that displays the following prompts using two label components:
Enter the length of the office:
Enter the width of the office:
Have your program accept the user input in two text fields. When a button is clicked, your program should calculate the area of the office and display the area in a text field. This display should be cleared whenever the input text fields receive the focus. A second button should be provided to terminate the application (Exit button). The following tutorial shows you much of the code solution. Feel free to use the tutorial, but make changes so that it you are not simply copying the tutorial code for your your entire solution.