Answered step by step
Verified Expert Solution
Question
1 Approved Answer
HW 4 - Design Class Due Feb 10 2. Design a class that could be used to generate individual objects, each one representing an individual
HW 4 - Design Class Due Feb 10 2. Design a class that could be used to generate individual objects, each one representing an individual example of the type you picked in step 1. a. Design the attributes of the class (minimum 3) b. Design the methods of the class i. EVERY class you design will have at least 1. accessor methods (get methods) - used to read attribute values 2. mutator methods (set methods) - used to set attribute values ii. Include the two types above for each attribute, then invent one more. This can be something simple, such as a simple report function, or simple calculation. iii. This means you will have 7 methods altogether: 3 get's, 3 set's, and 1 more (from part il here) additional ones you design. In our case, you will design two additional attributes. i. Design extra attributes needed for sub-class 1 ii. Design extra attributes needed for sub-class 2 iii. Create accessor and mutator methods for each of your additional attributes iv. This means you will have 4 methods altogether for each subclass, 2 get's and 2 set's 3. Report your designs using the following table as an example template. NOTE: This table is incomplate. You must add EXTRA rows for the methods, in order to have 7 altogether in the Class that you invent. You must also add rows to describe your sub-classes, for your attributes, and for all your methods information in order to describe each instance properly. Typical attributes for Coins might be: type, age, condition, value, mint mark. as gold, silver, copper. copper plate, etc. Other sub-classes for Coins might be InternationalCoins, or SilverDollars, or Commemorative, etc. DO NOT USE 'COINS' FOR YOUR
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