Write a class named Mobile that holds data about a mobile in a retail store. The class should have the following member variables:
• Name/brand. A string that holds name of the brand of phone.
• unitsOnHand. An int that holds the number of units currently in inventory.
• price. A double that holds the retail price.
Write a constructor that accepts arguments for each member variable, appropriate functions that store values in these member variables, and accessor functions that return the values in these member variables.
Once you have written the class,
Write another class Store (link list) having Mobile as a node then provide function to insert new mobile in list and to Delete a mobile and to display all mobiles.
Write a main program that shows all the functionality.
Note: you have to implement all scenarios (insert and delete at start, end, in between).
Comments
Leave a comment