Design and implement a set of classes that definevarious types of electronic equ
ID: 3615235 • Letter: D
Question
Design and implement a set of classes that definevarious types of electronic equipment (computers, cell phones,pagers, digital cameras, etc.). Include data values that describevarious attributes of the electronics, such as the weight, cost,power usage, and the names of the manufactures. Include methodsthat are named appropriately for each class and that print anappropriat message. Create a main driver class to instantiate andexercise several of the classes. Design and implement a set of classes that definevarious types of electronic equipment (computers, cell phones,pagers, digital cameras, etc.). Include data values that describevarious attributes of the electronics, such as the weight, cost,power usage, and the names of the manufactures. Include methodsthat are named appropriately for each class and that print anappropriat message. Create a main driver class to instantiate andexercise several of the classes.Explanation / Answer
The key here is abstraction. Certain fields such as theweight can be abstracted to a more general class, say,ElectronicEquipment. Then the specific classes for computers,cell phones, etc. inherit from ElectronicEquipment and hold datafor more specific attributes.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.