Use the Computer and InstallRecord classes declared in Programming Warrh-Up Exercises 10 to 14, together with the SortedList class developed in Chapter 13, as the basis for an object-oriented program that keeps track of a company’s computer inventory. The company has at most 500 computers. The following operations should be supported:
Add a new computer to the list.
Delete a computer from the list.
Change the location of a computer.
Print a list of all computers in inventory-number order.
Print a list of all computers in a given location.
Print a list of all computers of a particular brand.
Print a list of all computers installed before a given date.
The application should keep the list sorted by inventory number. It should read an initial list from a file called original. dat. At the end of processing, it should write the current data in the list onto a file called update. dat in a format that could be read back in by the program as an initial list. You will also need to develop the SimpleDate class to the degree necessary to support the application.
Exercise 10
Given the following declaration for a class that represents a computer in a company’s inventory, write a derived class declaration (for a class called InstallRecord) that adds (1) a string field representing the location of the computer and (2) a field of class SimpleDate that holds the installation date. The new class should provide observers for each of the new fields. It should also reimplement the Write function.
class Computer{public: Computer(string newName, string newBrand, string newModel, int newSpeed, string newSerial, int newNumber); string GetName() const; string GetBrand() const; string GetModel() const; int GetSpeed() const; string GetSerial() const; int GetNumber() const; void Write() const;private: string name; string brand; string model; int speed; string serialNumber; int inventoryNumber;};Exercise 11
Implement the constructor for the Computer class declared in Exercise 10.
Exercise 12
Implement the constructor for the InstallRecord class declared in Exercise 10.
Exercise 13
Implement the Write function for the Computer class declared in Exercise 10. It should output each member field on a separate line.
Exercise 14
Implement the Write function for the InstallRecord class declared in Exercise 10. It should output each member field on a separate line. Assume that the SimpleDate class provides a void function called Write 0 that outputs the date in a standard format.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.