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:
- Video store employee can add a new video to the inventory.
- The attributes of a video include:
- Title
- ID: 7 digit number
- Rating (G,PG,PG-13,R,X,N), N is for not rated
- OverNight Rental (true is video is for overnight rental only)
- Medium: Tape or DVD
- 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.
- Date: video was rented.
- Number of times video was rented.
- 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.
- Program keeps track of how much money was collected during the session.
- Returning a video, empolyess enters the customer's ID and retrieves a list of videos
checked out. Selects one or more to be returned.
- When the program is terminated, The amount of money collected is displayed.
IMPLEMENTATION (NON-FUNCTIONAL) REQUIREMENTS:
- You must use the MFC Document/View architecture.
- The document is a list of Video objects, You can use the formView for the base class of
the view object.
- 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.
- When editing or renting a video, your program should display a dialog box with a list of
current video IDs sorted by ID.
- 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.
- 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.
- You should store the list of videos either in the MFC CObList, CObArray, CTypedPtrList,
or one of the STL collection objects.
HINTS:
- Ex17A contains many of the ingredients you need for this project.
I would start with that program and modify it accordingly.
- Break the problem down and attack various pieces in isolation. Start with EX17A and
modify the student object and its view.
- Add new menu items
- Add new dialog boxes to list the objects.
- One of the styles of a list box is "Sorted" - you don't have to sort the data
when displaying the list of IDs.
- Paint program
from last year demonstrates object collection serialization as well using CObjArray MFC
collection object.
Copyright chris wild 1999/2000.
For problems or questions regarding this web contact [Dr.
Wild].
Last updated: February 01, 2000.