Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define the superclass GymEquipment, with its 2 subclasses as follows [ 35pts ] Class GymEquipment Class CardioMachine Class FreeWeightMachine Note: - GymEquipment class should be

image text in transcribed

Define the superclass GymEquipment, with its 2 subclasses as follows [ 35pts ] Class GymEquipment Class CardioMachine Class FreeWeightMachine Note: - GymEquipment class should be not be allowed to be instantiated - itemCount is a static variable that should be initialized to 0 . This value will be incremented each time a new type of gym equipment is created (a) Define the following - 2-arg constructor that uses manufacturer name and current date - 4-arg constructor that uses all four instance variables (b) Define all getter and setter methods for the subclasses (c) Create other supporting methods, as needed Feb 11, 2023 (d) Define main() method for this class that will: - Print a welcome message - Provide all equipment type names and ask user which type of those needs to be created - For each type, ask user for the price - Create a total of 3 equipment objects iteratively using user-provided data. You will need to loop 3 times - Print all attribute details of the equipment created on the console - Use a Scanner to read user input

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

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions