Question: c++ The following diagram illustrates the classes you will implement in this lab and their relationships. Private Item name Type: string (-) manufacturer Type: string

The following diagram illustrates the classes you will implement in this lab and their relationships. Private Item name Type: string (-) manufacturer Type: string (-) ID Type: int (-) price Type: int (+) Parameterized Constructor (+) Setters (+) Getters (+) printDetails :void Public Phone () cameraResolution Type: int (-) Os Type Type: string (+) Parameterized Constructor (*) Getters (+) Setters Laptop (-) RAMSize Type: int (-) Processor Type Type: string (+) Parameterized Constructor (+) Getters (+) Setters QUESTION 1: The implementation of class Item is uploaded to the elearning. Copy Item.h and Item.cpp to your project. QUESTION 2: 1. Implement class Phone, which inherits from class Item (use public inheritance) 2. Function print Details of the base class should be overridden to print the additional information about the resolution of the camera and the OS type. QUESTION 3: Implement class Laptop, which inherits from class Item (use protected inheritance). 1. Function getName in the base class should be overridden to return the name + "(Laptop)". 2. Function printDetails of the base class should be overridden to print the additional information about the size of the RAM and processor type. QUESTION 4: Implement a driver program to test your code. 1. create an object of type Phone, assign the appropriate values for each data member, don't forget to assign values to parent class data members. 2. create an object of type Laptop, assign the appropriate values for each data member, don't forget to assign values to parent class data members. 3. print the details of both objects. 4. change the name for both objects to be "New name". Justify any error occurs. 5. print the name for both objects
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
