Windows NT Systems Programming: Spring 2000

[ Home | Syllabus | Course Notes | Assignments | Search]


Assignment 2: Video Store Rental Program

Description: This program build a small video store rental program. The main purpose of this assignment is to utilize the MFC Document/View architecture and therefore the functionality has been constrained in order to focus on Document/View. Your program should allow a video store employee to add a new video, rent a video and return a video. Other than keeping track of which customer is currently renting a video, there is no customer data base. Therefore the main object in this assignment is a video tape/DVD object. Your program will read/write the video list to a disk. Please note the non-funcitional requirements which must be met for full credit.

Due: Feb 22 (Tuesday).

FUNCTIONAL REQUIREMENTS:

  1. Video store employee can add a new video to the inventory.
  2. The attributes of a video include:
    1. Title
    2. ID: 7 digit number
    3. Rating (G,PG,PG-13,R,X,N), N is for not rated
    4. OverNight Rental (true is video is for overnight rental only)
    5. Medium: Tape or DVD
    6. Customter: ID of customer currently renting the video (or blank if none). The customer ID consists of the first four letters of the last name (x is less than four)following by a 5 digit number.
    7. Date: video was rented.
    8. Number of times video was rented.
  3. Renting a video, employee enters the video's ID and retrieves the video record, then marks the customer ID (date is entered automatically). Program will list the rental price as $3.00 for video's with overnight rental, $1.00 otherwise. DVD videos are charged an additional dollar.
  4. Program keeps track of how much money was collected during the session.
  5. Returning a video, empolyess enters the customer's ID and retrieves a list of videos checked out. Selects one or more to be returned.
  6. When the program is terminated, The amount of money collected is displayed.

IMPLEMENTATION (NON-FUNCTIONAL) REQUIREMENTS:

  1. You must use the MFC Document/View architecture.
  2. The document is a list of Video objects, You can use the formView for the base class of the view object.
  3. You should have menu items for "Enter a new video/ Edit an existing video/ Rent a video/Return a video"
    The last three should be disabled if the video list is empty.
  4. When editing or renting a video, your program should display a dialog box with a list of current video IDs sorted by ID.
  5. When editing a video, the rating should be implemented as a set of "radio" buttons, the media type either as a set of radio buttons or listbox, the overnight property as a check box, the title as a CEdit control.
  6. When returning a video, you should enter the customer ID in a dialog box. Then a second dialog box must display the list of videos currently rented by this customer. Selecting the videos to be returned will update the video records.
  7. You should store the list of videos either in the MFC CObList, CObArray, CTypedPtrList, or one of the STL collection objects.

HINTS:

 


Copyright chris wild 1999/2000.
For problems or questions regarding this web contact [Dr. Wild].
Last updated: February 01, 2000.