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 24/11/2004 (18:00)

We want to realize a program to be used in a book store to manage the book archive. For each book, the following information is stored: title (a string), author (a string), number of copies that are available (if the number of copies is 0, this means that the book is not available), and price (a double). If the book is not available, the price information is not significant (e.g., you may assume that it is 0).

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

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

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

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