Homework 4 - Arrays, Loops, and Then Some
Due: Thursday, June 12, 2008


This assignment is designed to introduce you to arrays as well as reinforce your understanding of Exceptions, loops, and Java, in general.

It asks you to build a Bookshelf class capable of holding a fixed number of books. The Bookshelf has a few simple behaviors, which are described below. It also asks you to developa Menu class which should contain the main() method and provide the user with a menu allowing the user to exercise all of the features of the Bookshelf class.

The Bookshelf

Each Bookshelf should allow the user to store a fixed number of books. The user can add, remove, and access books as described below.

The Menu class

The menu should provide the user with the option of creating a new Bookshelf of a user-defined size, and then of adding, removing, and printing indididual books, or of printing a list of the titles of all books wihtin the Bookshelf.

The Textbook class

You may use your prior Textbook class, or the Textbook.java that we provide.