Question: Step 1: Create a UML class diagram for your superclass. (You may create it in Word, draw & scan it, or any use any software
Step 1: Create a UML class diagram for your superclass. (You may create it in Word, draw & scan it, or any use any software you wish to create it.) You class should include at leastthe following:
3 variables (e.g. number of burgers on a patty, size of pizza, flavor frosting, etc.)
7 methods
At least one getter and setter per variable
At least one other method. You might consider a constructor.
You should also create a UML class diagram for a subclass that will inherit from the super class (e.g. if you created a pizza, you could create a margherita pizza as your subclass; if you created a sandwich your subclass could a grilled cheese, etc.) Your subclass should have at least:
1 additional variable
3 methods
A getter and setter for the new variable
At least one other method. It may be a new method, or you may override a method created in your parent class
You should also write a 1-2 sentence explanation for each variable & method as to what it means, why you chose to make it public or private, and data types. The UML and explanations should be included in your analysis file. (20 points)
Step 2: Now implement your superclass. Be sure each method you define prints to the screen stating it has been called. (e.g. you call sushi.dipSoySauce(); and in addition to whatever other logic may be required you will also include a line of code like System.out.println(sushi.dipSoySauce() was called!);
Step 3: Now implement your subclass that inherits from the class you created in Step 2, and provide the same documentation specified in step 2. (25 points)
Step 4: Create a program that calls your class. It should create at least 2 instances of the super class and 2 instances of the subclass. Each function should be called at least once.(25 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
