You are on page 1of 2

UNIVERSITI SAINS MALAYSIA

School of Computer Sciences Session 2011/2012, Semester 2 CPT113: Programming Methodology & Data Structures ASSIGNMENT ONE Car Rental Management System
Hertz, the world's leading vehicle renting organization, operates from approximately 7,700 locations in 145 countries worldwide. Hertz is the largest general use car rental brand in the world, and the number one airport car rental brand in the U.S. and at 69 major airports in Europe, operating both corporate and licensee locations in cities and airports in North America, Europe, Latin America, Australia and New Zealand. In addition, the Company has licensee locations in cities and airports in Africa, Asia, and the Middle East. Today, Hertz's Worldwide Product such as Green Collection, Compact/MidSize, Full Size, and SUV offered through the company. Reservations Centers handle approximately 40 million phone calls and deliver approximately 30 million reservations annually. Write a program to assign customer reservation for Hertz Car Rental System.

Assume a car rental system with reservation as follows:


January February March April May June Green Collection Green Collection Green Collection Green Collection Green Collection Green Collection Compact/MidSize Compact/MidSize Compact/MidSize Compact/MidSize Compact/MidSize Compact/MidSize Full Size/Standard Full Size/Standard Full Size/Standard Full Size/Standard Full Size/Standard Full Size/Standard SUV/MiniVan SUV/MiniVan SUV/MiniVan SUV/MiniVan SUV/MiniVan SUV/MiniVan

The program should display the reservation pattern, with an X marking the cars already taken. For example, after JanuaryGreenCollection, FebruaryCompact, and MarchFullSize are taken, the display should look like:

January February March April May June January

X Green Collection Green Collection Green Collection Green Collection Green Collection Green Collection

Compact/MidSize X Compact/MidSize Compact/MidSize Compact/MidSize Compact/MidSize Compact/MidSize

Full Size/Standard Full Size/Standard X Full Size/Standard Full Size/Standard Full Size/Standard Full Size/Standard

SUV/MiniVan SUV/MiniVan SUV/MiniVan SUV/MiniVan SUV/MiniVan SUV/MiniVan SUV/MiniVan

After displaying the cars available, the program prompts for the month and cars desired. The user type in a month and car, and then the display of available car is updated. This continues until all cars are filled or until the user signals that the program should end. If the user types in a car that is already taken, the program should say that the car is not available and ask for another choice. Requirements: 1. Define class and represent using the UML Diagram Tips: Define a class called Month that is an abstract data type for a month. Your class will have a one member variable of type int to represent a month (1 for January, 2 for February, and so forth). Include all the following member functions: a constructor to set the month using the first three letters in the name of the month as three arguments, a constructor to set the month using an integer as an argument (1 for January, 2 for February, and so forth), a default constructor , an input function that reads the month as an integer, an input function that reads the month as the first three letters in the name of the month. 2. Write the program that includes: a. Constructor and Destructor b. Inheritance c. Friend Class d. Operator Overloading e. Linked List

You might also like