Question: You need to implement an amateur level system for a device and its applications. A Device can be of two types i.e. Mobile and Desktop.

You need to implement an amateur level system for a device and its applications. A Device can be of two types i.e. Mobile and Desktop. There are two types of Application i.e. Calls and Store. A Device may have zero or many applications. An Application from above mentioned types can be installed in Device and can be uninstalled as well. After installation, application can be run to execute its functionalities. Functionalities of specific applications are given below. You should implement (constructors, destructors & functions) for following classes: 1) Class Application (Parent class) With following members & functions It will have private variable Name (char *), Version (float) It will have a function print To display all the features of the Application. It has the function run Which is pure virtual function. 2) Class Store (Derived class from Application) With following members & functions For the time being this class has no data member. It will have a function print To display all the features of the Application (Think about, how you can use the function in parent class). It will have a function run (overrides the function from parent class) Which displays some dummy new applications (Upon your wishes) and returns. 3) Class Calls (Derived class from Application) With following members & functions It will have a private variable totalCalls (int*) It will have a function print To display all the features of the Calls. (Think about, how you can use the function in parent class). It will have a function run (overrides the function from parent class) Which displays some dummy new Calls and asks user to make a new call. You have to make a function makeNewCall. This function executes a cout statement i.e New Call, Done. And increments the variable totalCalls. 4) Class Device (Parent class) With following members & functions: It will have protected dynamic variables for listOfApplications (Application **), totalApplications (Int) RAM (Int), Processor (float), OS Version (char *), It will have a function print () To display all the features of Device. It will have a function onStart() Which displays a menu to user 1. List all applications (prints all installed apps on screen) 2. Install an application (makes a new object and insert in list) 3. Uninstall an application (deletes an object from the installed list) 4. Run an application (asks user which application you want to run and calls the run function of that application) You have to implement separate functions for all the above menu options

Class Mobile (Derived class from Device) With following functions It will have private variable

Camera (Int) It will have a function print o To display all the features of the Mobile. (Think about, how you can use the function in parent class). 6. Class Desktop (Derived class from Device) With following functions It will have private variable o gpu (Boolean) It will printinfo. o To display all features of Desktop. main () function This function will offer following functionalities

o Create two pointers of type Device and which will hold two objects of Mobile and Desktop o With the construction of object of these Mobile/Desktop classes, you have to send data of required data members. Initially Desktop/Mobile class objects will have no applications installed. o Call the function onStart(), install at least two applications in every device. Installation Details: You have to create an object of any type of application and that object will be pointed by a pointer from listOfApplications. You have to maintain the size of these applications. This listOfApplications will dynamically increase and decrease according to the applications installed in this device. o User must be allowed to run at least an application in each device. o User must be allowed to uninstall any installed application o Uninstallation Details: You have to uninstall an application. Which means you have to delete an object from listOfApplications, so you have shrink the memory. o You have to print all the devices details and application details on screen for all application

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!