Exercises

1.Draw a picture of the operation of the find_nocase function when it is searching for the value “purple” in an xstring with the value “A Purple couch”.
2.Add the ability to edit an existing description field rather than having to type the whole field in again. Which classes will have to be changed to do this?
3.Before writing over the old version of the data base at the conclusion of the program, copy that file to another name so that the user can go back to it if necessary.
4.At present, the ExecuteMenuChoice function always saves the inventory in the backup file after calling AddItem. This is not necessary if the user didn't actually add a new item. Fix the code so that this unnecessary operation is avoided.
5.Add the ability for the user to select a category from a list of those that already exist. Of course, you still have to allow the user to specify a new category when desired.
6.Add the ability for the user to see only items of a given type, such as “Basic” or “Music”, rather than having to see all types together in one list.
7.Change the data entry function so that the user can correct an entry and continue entering data for an item even after making an error.
8.Add validation of dates so that invalid dates such as 19970231 are not accepted.
9.Allow the user to type dates with or without slashes so that 1997/02/28 will be the same as 19970228.
10.Add the ability for the user to print selected items according to category, description, and the like.
11.Explain why hitting the ENTER key when asked for a category produces a list including all categories.
12.Implement the HomeItemCollectible class as a derived class of HomeItemBasic to keep track of objects such as coins or stamps. The added fields should include date of creation, condition, artist, and any other appropriate fields.
..................Content has been hidden....................

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