Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Overview: For this assignment, you will be creating classes to support one of the applications listed at the bottom of the assignment, based on your
Overview: For this assignment, you will be creating classes to support one of the applications listed at the bottom of the assignment, based on your last name. You will create a parentsuper class structure and two related subclasses. You will store super and subclass objects in arrays specific for the object type requires arrays Your program will display superclass and subclass items to the screen nicely formatted and labeled The following provides the specific guidance for the assignment. There is also a rubric that will be used for grading.Specific Guidance:Class structures in separate class files: Create a superclass with at least two attributes appropriate to your application. One of the attributes must be "private" and have a setter and getter. Both a setter and getter must be demonstrated at least once in your main program. You will need a super default constructor and an overloaded constructor to support the overloaded constructors in the subclasses. Create two subclasses, each with unique attributes appropriate for the application ie for a custom furniture business it might be tools with attributes age and last maintenance date and wood type of wood, hardness level Include at least one default constructor and overloaded constructors for both subclasses that initialize all subclass attributes. Override the toString in the super and both subclasses in order to support the printarray method. Main Program in a separate file from classes: Instantiate and initialize at least three superclass objects and store them in an array specific for their object type. Remember that you need to use a "setter" to initialize a private superclass attribute at least once as well as demonstrating the overloaded constructor Instantiate and initialize at least subclass objects of each type. Use separate arrays specific to each object type to store the objects for each subclass. Demonstrate use of both the default and overloaded constructors Create a printarray method which will display each item in an array of objects. Call this method sending the array name as the parameter to display all the superclass and subclass objects with all attributes your overridden toString will support the format Capture screenshots of your execution display.
Topics:The topics are listed below based on the first letter of your last name. Suggestions are provided for the super attributes, super method, and subclasses, but you may design these differently if you choose, as long as the super attributes and method relates to your specific topic.MP Food tracking This would be classes for someone tracking their food intake for health purposes. superclass attributes: name, calories subclasses: dessert, meat
Please don't use AI or chatgpt
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started