UMBC CS 201, Fall 02
UMBC CMSC 201 Fall '02 CSEE | 201 | 201 F'02 | lectures | news | help

CMSC 201
Programming Project Five
B and B Video Rentals

Out: Sunday 11/24/02
Original due date: before Midnight, Sunday 12/08/02

New due date: before Midnight, Tuesday 12/10/02

The design document for this project, design5.txt
is due: Before Midnight, Monday 12/02/02

The Objective

The objective of this assignment is to give you practice using command line arguments, pointers, files, malloc, and linked lists.

The Background

B and B Video Rentals has just had its Grand Opening ! The shelves are stocked with multiple copies of some classic movies. Some customers were signed up in advance of the opening in response to early advertising.

The Task

Your task is to write a program that will allow the clerk to check out tapes for customers, check in tapes from customers, check the number of copies in stock for each movie title, and check to see which videos a particular customer is currently renting.

Initially, your program should read in information from the movies.dat file and create an array of MOVIEs to hold that information. Each MOVIE structure must contain a movie ID number, the title of the movie, the number of copies of that movie the store owns, the replacement cost of a tape (price), and the head of a linked list. The linked list holds information about each of the individual TAPEs of that movie. Each TAPE must hold the following information : the movie ID number, the title, the copy number, and the number of times that copy has been rented. Your program should also read in information from the customers.dat file and place it into an array of CUSTOMERs. Each customer's information includes a customer number, the customer's name, address, and phone number, the total number of tapes that customer has rented, the number of tapes the customer is currently renting and the head of a linked list. This linked list holds information about each of the individual TAPEs that customer is currently renting.

Initially, you will use the information about each MOVIE to create a TAPE for each of the copies the store owns. You will have to initialize each of these TAPEs with the movieID and title of that MOVIE, give each TAPE a copy number, and initialize times rented to be 0, since none of the tapes have ever been rented. Each of these TAPEs will become the data portion of NODEs that comprise the linked list of tapes that are in stock for that particular movie. So the member called "head" in the MOVIE structure is the head of that linked list. If B and B Videos owns 3 copies of "Ghost" which is movieID# 4, then the linked list would contain tapes with copyNum's of 1, 2 and 3. So there would be 3 NODEs in the linked list pointed to by the member called head found in the MOVIE structure.

When a customer rents a video, the first TAPE will be removed from the "In Stock" linked list and inserted into that customer's linked list of currently rented movies.

The following data structures are required and may NOT be altered.

typedef struct tape { int movieID; char title[51]; int copyNum; int timesRented; } TAPE; typedef struct node { TAPE data; NODEPTR next; }NODE; typedef struct movie { int movieID; char title[51]; int numCopies; float price; int numOnShelf; NODEPTR head; } MOVIE; typedef struct customer { int customerNum; char name[51]; char address[101]; char phone[13]; int totalRented; int currentRented; NODEPTR rentals; } CUSTOMER; Your program will accept two command line arguments which are the names of the two data files to be used: movies.dat and customers.dat.

Your program will present a menu to the user with the following choices

O - check Out a tape I - check In a tape S - check Stock of a movie C - check a Customer's information Q - Quit When the user chooses O to check out a tape, your program will prompt the user for the customer number, greet the cutomer, display the movie titles available, and ask the user to enter a movie number. The first tape in the linked list of tapes in stock for that movie is to be removed and inserted into the customer's linked list of currently rented tapes. The customer should then be shown his list of currently rented tapes.

When the user chooses I to check in a tape, your program will prompt the user for the customer number, greet the customer, display the list of tapes that customer is currently renting and ask the user to chose the movie number of the tape he would like to return. Your program should then delete that tape from the customer's currently rented linked list and insert it into the linked list of tapes in stock with that same title.

When the user chooses S to check the tapes in stock for a movie, your program should show the user a list of movie titles and prompt him to enter a movie number. All of the information about that movie should be shown and all of the information about the individual tapes in stock of that movie should also be shown (see sample output below).

When the user chooses C to check the tapes that a customer is currently renting, your program should prompt the user for a customer number, show all the information about that customer and show the movie number and title for each of the tapes the customer is currently renting (see sample output below).

When the user Quits, your program will free any and all memory that was dynamically allocated by your program, including the freeing of each node in a list. A thank you message should be printed before your program ends.

See the sample output below for details.

Project Requirements

  1. You must use the structures shown above. You may use the linked list code that was shown in lecture 23. Some of the functions will require some minor modification. Some of the functions will not have to be changed at all.
  2. You must write two new functions to be added to the linked list code: DestroyList() and RemoveFirstNode().
  3. When taking a TAPE from stock for rental, the first TAPE in the list is to be removed. When returning a TAPE to stock, it should be inserted at the end of the list. This will keep all of the tapes evenly out in circulation, rather than letting a few tapes get most of the wear.
  4. Your program must accept both uppercase and lower case input for the menu selection. You must validate the menu choices.
  5. All input must be validated.

Assumptions

Your program may make the following assumption
  1. All movie titles will be a maximum of 50 characters.
  2. Graders will enter only one character and the newline for the menu choice.

Data Files

The two data files are available for you to use for testing. In Bogar's public directory /afs/umbc.edu/users/s/b/sbogar1/pub/ you will find movies.dat and customers.dat You may use these files or create your own files for testing.

Sample Output

Your Greeting Goes Here O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : o Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Hello, Benjamin Baumgarten 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Which movie do you want to check out ? Please enter an integer between 1 and 5 : 3 Movie #:3 - Few Good Men, A - Copy #:1 - Times rented:1 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : o Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Hello, Benjamin Baumgarten 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Which movie do you want to check out ? Please enter an integer between 1 and 5 : 2 Movie #:3 - Few Good Men, A - Copy #:1 - Times rented:1 Movie #:2 - Dirty Dancing - Copy #:1 - Times rented:1 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : o Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Hello, Benjamin Baumgarten 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Which movie do you want to check out ? Please enter an integer between 1 and 5 : 5 Movie #:3 - Few Good Men, A - Copy #:1 - Times rented:1 Movie #:2 - Dirty Dancing - Copy #:1 - Times rented:1 Movie #:5 - Indiana Jones and the Temple of Doom - Copy #:1 - Times rented:1 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : o Please Enter Your Customer Number Please enter an integer between 1 and 19 : 5 Hello, Francis Poole 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Which movie do you want to check out ? Please enter an integer between 1 and 5 : 2 Movie #:2 - Dirty Dancing - Copy #:2 - Times rented:1 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : o Please Enter Your Customer Number Please enter an integer between 1 and 19 : 5 Hello, Francis Poole 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Which movie do you want to check out ? Please enter an integer between 1 and 5 : 4 Movie #:2 - Dirty Dancing - Copy #:2 - Times rented:1 Movie #:4 - Ghost - Copy #:1 - Times rented:1 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : o Please Enter Your Customer Number Please enter an integer between 1 and 19 : 7 Hello, Linda LeFevre 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Which movie do you want to check out ? Please enter an integer between 1 and 5 : 2 Sorry. Currently all of the copies of Dirty Dancing have been rented Please make another selection. 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Which movie do you want to check out ? Please enter an integer between 1 and 5 : 5 Movie #:5 - Indiana Jones and the Temple of Doom - Copy #:2 - Times rented:1 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : s 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Check stock for which movie ? Please enter an integer between 1 and 5 : 1 Movie ID #: 1 Title: Braveheart Number of copies: 10 Price: 25.95 Number of copies on the shelf : 10 Movie #:1 - Braveheart copy #:1 has been rented 0 times Movie #:1 - Braveheart copy #:2 has been rented 0 times Movie #:1 - Braveheart copy #:3 has been rented 0 times Movie #:1 - Braveheart copy #:4 has been rented 0 times Movie #:1 - Braveheart copy #:5 has been rented 0 times Movie #:1 - Braveheart copy #:6 has been rented 0 times Movie #:1 - Braveheart copy #:7 has been rented 0 times Movie #:1 - Braveheart copy #:8 has been rented 0 times Movie #:1 - Braveheart copy #:9 has been rented 0 times Movie #:1 - Braveheart copy #:10 has been rented 0 times O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : s 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Check stock for which movie ? Please enter an integer between 1 and 5 : 2 Movie ID #: 2 Title: Dirty Dancing Number of copies: 2 Price: 19.95 Number of copies on the shelf : 0 There are no copies in stock. O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : s 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Check stock for which movie ? Please enter an integer between 1 and 5 : 3 Movie ID #: 3 Title: Few Good Men, A Number of copies: 7 Price: 22.95 Number of copies on the shelf : 6 Movie #:3 - Few Good Men, A copy #:2 has been rented 0 times Movie #:3 - Few Good Men, A copy #:3 has been rented 0 times Movie #:3 - Few Good Men, A copy #:4 has been rented 0 times Movie #:3 - Few Good Men, A copy #:5 has been rented 0 times Movie #:3 - Few Good Men, A copy #:6 has been rented 0 times Movie #:3 - Few Good Men, A copy #:7 has been rented 0 times O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : s 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Check stock for which movie ? Please enter an integer between 1 and 5 : 4 Movie ID #: 4 Title: Ghost Number of copies: 3 Price: 19.95 Number of copies on the shelf : 2 Movie #:4 - Ghost copy #:2 has been rented 0 times Movie #:4 - Ghost copy #:3 has been rented 0 times O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : s 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Check stock for which movie ? Please enter an integer between 1 and 5 : 5 Movie ID #: 5 Title: Indiana Jones and the Temple of Doom Number of copies: 3 Price: 19.95 Number of copies on the shelf : 1 Movie #:5 - Indiana Jones and the Temple of Doom copy #:3 has been rented 0 times O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 1 Customer #: 1 Name: Charles Barrett Address: 1623 Lancaster St., Baltimore, MD 22131 Phone: 410-555-7320 Total rented: 25 Currently renting: 0 You don't have any rented movies now. O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 5 Customer #: 5 Name: Francis Poole Address: 7490 Stansbury Rd., Baltimore, MD 21222 Phone: 410-555-2856 Total rented: 16 Currently renting: 2 You have rented : Movie #:2 - Dirty Dancing Movie #:4 - Ghost O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 7 Customer #: 7 Name: Linda LeFevre Address: 913 S. Ann St., Baltimore, MD 22131 Phone: 443-555-7481 Total rented: 205 Currently renting: 1 You have rented : Movie #:5 - Indiana Jones and the Temple of Doom O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Customer #: 15 Name: Benjamin Baumgarten Address: 503 Ralston Ave., Baltimore, MD 21208 Phone: 410-555-9357 Total rented: 89 Currently renting: 3 You have rented : Movie #:3 - Few Good Men, A Movie #:2 - Dirty Dancing Movie #:5 - Indiana Jones and the Temple of Doom O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 18 Customer #: 18 Name: Shirley Chin Address: 513 Maple St., Reisterstown, MD 21136 Phone: 443-555-4123 Total rented: 71 Currently renting: 0 You don't have any rented movies now. O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : i Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Hello, Benjamin Baumgarten Which movie do you want to check in ? You have rented : Movie #:3 - Few Good Men, A Movie #:2 - Dirty Dancing Movie #:5 - Indiana Jones and the Temple of Doom Enter the Movie #: 5 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : i Please Enter Your Customer Number Please enter an integer between 1 and 19 : 2 Hello, Kimberly Johnson Which movie do you want to check in ? You don't have any rented movies now. Enter the Movie #: 5 Movie #5 is not one of the movies you've rented O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : i Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Hello, Benjamin Baumgarten Which movie do you want to check in ? You have rented : Movie #:3 - Few Good Men, A Movie #:2 - Dirty Dancing Enter the Movie #: 2 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Customer #: 15 Name: Benjamin Baumgarten Address: 503 Ralston Ave., Baltimore, MD 21208 Phone: 410-555-9357 Total rented: 89 Currently renting: 1 You have rented : Movie #:3 - Few Good Men, A O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 7 Customer #: 7 Name: Linda LeFevre Address: 913 S. Ann St., Baltimore, MD 22131 Phone: 443-555-7481 Total rented: 205 Currently renting: 1 You have rented : Movie #:5 - Indiana Jones and the Temple of Doom O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : i Please Enter Your Customer Number Please enter an integer between 1 and 19 : 7 Hello, Linda LeFevre Which movie do you want to check in ? You have rented : Movie #:5 - Indiana Jones and the Temple of Doom Enter the Movie #: 5 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : s 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Check stock for which movie ? Please enter an integer between 1 and 5 : 5 Movie ID #: 5 Title: Indiana Jones and the Temple of Doom Number of copies: 3 Price: 19.95 Number of copies on the shelf : 3 Movie #:5 - Indiana Jones and the Temple of Doom copy #:3 has been rented 0 times Movie #:5 - Indiana Jones and the Temple of Doom copy #:1 has been rented 1 times Movie #:5 - Indiana Jones and the Temple of Doom copy #:2 has been rented 1 times O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 7 Customer #: 7 Name: Linda LeFevre Address: 913 S. Ann St., Baltimore, MD 22131 Phone: 443-555-7481 Total rented: 205 Currently renting: 0 You don't have any rented movies now. O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 5 Customer #: 5 Name: Francis Poole Address: 7490 Stansbury Rd., Baltimore, MD 21222 Phone: 410-555-2856 Total rented: 16 Currently renting: 2 You have rented : Movie #:2 - Dirty Dancing Movie #:4 - Ghost O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : s 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Check stock for which movie ? Please enter an integer between 1 and 5 : 4 Movie ID #: 4 Title: Ghost Number of copies: 3 Price: 19.95 Number of copies on the shelf : 2 Movie #:4 - Ghost copy #:2 has been rented 0 times Movie #:4 - Ghost copy #:3 has been rented 0 times O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : i Please Enter Your Customer Number Please enter an integer between 1 and 19 : 5 Hello, Francis Poole Which movie do you want to check in ? You have rented : Movie #:2 - Dirty Dancing Movie #:4 - Ghost Enter the Movie #: 4 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : s 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Check stock for which movie ? Please enter an integer between 1 and 5 : 4 Movie ID #: 4 Title: Ghost Number of copies: 3 Price: 19.95 Number of copies on the shelf : 3 Movie #:4 - Ghost copy #:2 has been rented 0 times Movie #:4 - Ghost copy #:3 has been rented 0 times Movie #:4 - Ghost copy #:1 has been rented 1 times O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 5 Customer #: 5 Name: Francis Poole Address: 7490 Stansbury Rd., Baltimore, MD 21222 Phone: 410-555-2856 Total rented: 16 Currently renting: 1 You have rented : Movie #:2 - Dirty Dancing O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : i Please Enter Your Customer Number Please enter an integer between 1 and 19 : 5 Hello, Francis Poole Which movie do you want to check in ? You have rented : Movie #:2 - Dirty Dancing Enter the Movie #: 2 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : s 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Check stock for which movie ? Please enter an integer between 1 and 5 : 2 Movie ID #: 2 Title: Dirty Dancing Number of copies: 2 Price: 19.95 Number of copies on the shelf : 2 Movie #:2 - Dirty Dancing copy #:1 has been rented 1 times Movie #:2 - Dirty Dancing copy #:2 has been rented 1 times O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Customer #: 15 Name: Benjamin Baumgarten Address: 503 Ralston Ave., Baltimore, MD 21208 Phone: 410-555-9357 Total rented: 89 Currently renting: 1 You have rented : Movie #:3 - Few Good Men, A O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : i Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Hello, Benjamin Baumgarten Which movie do you want to check in ? You have rented : Movie #:3 - Few Good Men, A Enter the Movie #: 7 Movie #7 is not one of the movies you've rented O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : i Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Hello, Benjamin Baumgarten Which movie do you want to check in ? You have rented : Movie #:3 - Few Good Men, A Enter the Movie #: 2 Movie #2 is not one of the movies you've rented O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : i Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Hello, Benjamin Baumgarten Which movie do you want to check in ? You have rented : Movie #:3 - Few Good Men, A Enter the Movie #: 3 O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : s 1 - Braveheart 2 - Dirty Dancing 3 - Few Good Men, A 4 - Ghost 5 - Indiana Jones and the Temple of Doom Check stock for which movie ? Please enter an integer between 1 and 5 : 3 Movie ID #: 3 Title: Few Good Men, A Number of copies: 7 Price: 22.95 Number of copies on the shelf : 7 Movie #:3 - Few Good Men, A copy #:2 has been rented 0 times Movie #:3 - Few Good Men, A copy #:3 has been rented 0 times Movie #:3 - Few Good Men, A copy #:4 has been rented 0 times Movie #:3 - Few Good Men, A copy #:5 has been rented 0 times Movie #:3 - Few Good Men, A copy #:6 has been rented 0 times Movie #:3 - Few Good Men, A copy #:7 has been rented 0 times Movie #:3 - Few Good Men, A copy #:1 has been rented 1 times O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 5 Customer #: 5 Name: Francis Poole Address: 7490 Stansbury Rd., Baltimore, MD 21222 Phone: 410-555-2856 Total rented: 16 Currently renting: 0 You don't have any rented movies now. O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 7 Customer #: 7 Name: Linda LeFevre Address: 913 S. Ann St., Baltimore, MD 22131 Phone: 443-555-7481 Total rented: 205 Currently renting: 0 You don't have any rented movies now. O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : c Please Enter Your Customer Number Please enter an integer between 1 and 19 : 15 Customer #: 15 Name: Benjamin Baumgarten Address: 503 Ralston Ave., Baltimore, MD 21208 Phone: 410-555-9357 Total rented: 89 Currently renting: 0 You don't have any rented movies now. O - Check Out a Tape I - Check In a Tape S - Show Stock for a Movie C - Show a Customer's Information Q - Quit Please enter menu selection : q Thanks for renting your movies from B and B Video Rentals

Although your output need not be identical to the above, all information (including the greeting) must be present.

Submitting the Program

Use the submit command as in previous projects. Make sure you submit all files necessary for your project to compile.


CSEE | 201 | 201 F'02 | lectures | news | help

Wednesday, 04-Dec-2002 15:36:54 EST