Question: Summary Construct a simple program using object-oriented programming concepts. Learning Objectives Write a simple program using inheritance. Description Using C++, build a program that uses

Summary Construct a simple program using object-oriented programming concepts. Learning Objectives Write a simple program using inheritance. Description Using C++, build a program that uses the inheritance hierarchy below. Phone > Computer > Electronics File 1: Electronics Class An Electronics object has a private brand name (as a string). An Electronics object cannot be created without a brand name.

File 2: Computer Class A Computer is an Electronics object that also has a private operating system (as a string), in addition to a brand name. A Computer object cannot be created without a brand name and an operating system. File 3: Phone Class A Phone is a Computer object that also has a private phone number (as a string), in addition to an operating system and a brand name. A Phone object cannot be created without a brand name, an operating system, and a phone number. File 4: Driver Class / Program The driver class / program instantiates one object of each of the above classes. Remember to pass in the appropriate kind of data to the constructor. Then print each object, using the following format: Brand Name = ________ Brand Name = ________, Operating system = ________ Brand Name = ________, Operating system = ________, Phone number = _________ Be sure to call the appropriate parent class method/function. General Requirements for All Classes Each class must include any appropriate methods/functions, such as getters and/or setters, a constructor, and any other needed methods/functions. Be sure to use the appropriate access modifiers. Invoke base class / superclass constructors where appropriate.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!