Answered step by step
Verified Expert Solution
Link Copied!

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 parent/super class structure and two related subclasses. You will store super and subclass objects in arrays specific for the object type (requires 3 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):1) 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. 2) Create two subclasses, each with 2 unique attributes appropriate for the application (i.e. 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. 3) Override the toString in the super and both subclasses in order to support the printarray method. Main Program (in a separate file from classes):1) 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.2) Instantiate and initialize at least 3 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.3) 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).4) 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.(M-P) 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions

Question

Explain the focus of safety programs.

Answered: 1 week ago