ps3 - 1.124J Foundations of Software Engineering Problem...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1.124J Foundations of Software Engineering Problem Set 3 Due Date: Tuesday 10/3/00 Reference Readings: From C++ Primer (in addition to the reference reading from PS1 & PS2): Chapters: 9, 10, 14 Problem 1:[100%] In this problem set you have to develop a menu driven program. No files are provided for you, but you are asked to follow a certain class hierarchy. You need to use certain files to implement the latter, acording to the instructions below. The completed program should be a menu-driven application that allows the user, who may be an employee of a vehicle-rental company, to input information about a fleet of vehicles. Assume that the company rents motor vehicles, in particular cars and motorcycles, and bikes. The user should be able to add a vehicle, display the data and number of the already provided vehicles, save the vehicles to files, and quit the program, after making all the proper memory releases. The options of the initial menu should be the following: ************************************************** [A]: Add a vehicle [S]: Show vehicles [N]: Number of vehicles [F]: Save vehicles to files [Q]: Quit **************************************************
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The user should be prompted to give one of the above characters, upper or lower case, and the program should proceed accordingly. If any other character is given the program should insist on getting one of the specified characters. The first option, [A]: Add a vehicle , should enable the user to give the information about a vehicle to be added in the database. In order to simplify the problem we ignore all other possible options, such as deletion of a vehicle in the database. However, you should set the pointers correclty, so that someone could extend your program. After the user enters 'a' or 'A' the program should give a new menu from where the user should select the kind of vehicle to be added. This is explained in detail below. The second option [S]: Show vehicles , should display to the screen all the information about the vehicles that have been entered by the user. Details on the exact information to be displayed are provided below. The third option, [N]: Number of vehicles , should display to the screen the numbers of vehicles, motor vehicles, cars, motorcycles, and bikes. An example of the format that is expected to be used is the following: ************************************************** [A]: Add a vehicle [S]: Show vehicles [N]: Number of vehicles [F]: Save vehicles to files [Q]: Quit ************************************************** Your selection: n Number of vehicles: 4 Number of motorvehicles: 3 Number of cars: 2 Number of motorcycles: 1 Number of bikes: 1 Press any button and the <Enter> to proceed. .. ************************************************** The forth option,
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 14

ps3 - 1.124J Foundations of Software Engineering Problem...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online