Exercises

1.Implement the HomeItemComputer class as a derived class of HomeItemBasic to keep track of computers. The added fields should include serial number, amount of RAM, amount of disk space, a list of installed storage devices, and lists of installed ISA and PCI interface cards.
2.Implement the HomeItemSoftware class as a derived class of HomeItemBasic to keep track of computer software. The added fields should include the serial numbers of the software and computer on which it is installed. Can you devise a way to make sure that the latter serial number is the same as the serial number of a HomeItemComputer in the inventory?
3.Implement the HomeItemAppliance class as a derived class of HomeItemBasic to keep track of other electric and electronic appliances. The added fields should include the serial number of the appliance.
4.Can you think of a way to simplify the implementation of the classes in the above exercises by adding an additional class?
5.Implement the HomeItemBook class as a derived class of HomeItemBasic to keep track of books. The added fields should include author, publisher, publication date, number of pages, and ISBN (International Standard Book Number, a 10-character field that can contain the digits from 0 to 9 and the letter X).
6.Implement the HomeItemSet class as a derived class of HomeItemBasic to keep track of sets of identical items such as plates and flatware. The added fields should include the pattern name and number of items of each type.
7.Implement the HomeItemClothing class as a derived class of HomeItemBasic to keep track of clothes and shoes. The added fields should include owner's name and size.
8.Add code to the AddItem member function of the HomeInventory class to make sure that the new object being added has a name different from that of every object already in the inventory.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset