Free University of Bolzano/Bozen
Faculty of Computer Science - Bachelor in Applied Computer Science
Bachelor in Production Engineering
Introduction to Programming - A.A. 2004/2005

Lab Exam 23/11/2004

We want to realize a program to be used in a car rental office. For each car, the following information is stored: plate number (a string), category (a character), name of person who rented the car (a string), and number of days for which the car is rented (a non-negative integer). If the number of days is 0, this means that the car is not rented.

Part 1. Write a class Car that implements the following methods:

Use the example program TestCar.Java to test the class you have developed.

Part 2. Write a class UseCar, client of Car, that contains the following public static method:

Use the example program TestUseCar.java to test the method you have developed.


Solutions: Car.java, UseCar.java