< previous page page_966 next page >

Page 966
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
You decide to stop at this point, implement the video object, and test it before going on to the rest of the design.
2. Having completed the design and testing of the video object in Programming Problem 1, you are ready to continue with the original problem. Write a program to do the following tasks.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
a. Create a list of video objects.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
b. Search the list for a particular title.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
c. Determine if there are any copies of a particular video currently in the store.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
d. Print the list of video titles.
3. Now that the video inventory is under control, determine the characteristics of the customer and define a customer object. Write the operations and test them. Using this representation of a customer, write a program to do the following tasks.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
a. Create a list of customers.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
b. Search the list by customer name.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
c. Search the list by customer identification number.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
d. Print the list of customer names.
4. Combine the list of video objects and the list of customer objects into a program with the following capabilities.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
a. Check out a video.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
b. Check in a video.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
c. Determine how many videos a customer has (by customer identification number).
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
d. Determine which customers have a certain video checked out (by title). (Hint: Create a hasVideo object that has a video title and a customer number.)
Case Study Follow-Up
1. Write a test driver for the TimeCard class.
2. Object-oriented design makes code reuse easier and leads to flexible programs. See how easy it is to modify the case study's main driver so that it inputs two files (punchInFile and punchOutFile) and outputs not only the punch-in time but also the punch-out time for each employee whose ID is entered by the user. Make these modifications.

 
< previous page page_966 next page >