Project 2
Library Books

Due: Mon., March 5, 8 AM
Submit Project: Proj2
Required Files: Proj2.java, Book.java
Grading Header: header.txt

Having completed a project that uses simple arithmetic expressions, we will change directions for a moment to work on your knowledge of building and using classes. You will also be required to do some basic problem solving, as well as basic output.


Program Description

With this program you will begin to design a library system. As you know a library is made up of books, so the first thing we need to do is design a class for handling books. For this project in addition to writing the class Book, we will also write a driver program to test our implementation of Book.


Project Specifications

  1. Your program must be in a file named Proj2.java and your book class should be in a file called Book.java.
  2. In Book.java you must declare instance variables for the title, author, publisher, copyright date, ISBN number and a boolean called checkedOut which should be set to false to start.
  3. You must implement a constructor method which takes five parameters that will be used to initialize the uninitialized instance variables (title, author, publisher, copyright date, ISBN number). You will also need to build accessor and mutator methods for all six instance variable, and a toString method that returns a nicely formatted, multi-line description of the book.
  4. Processing Specifications:


Output Specifications

There is no keyboard interaction with this driver program so all you will get is output which should look like:

Title: Java Software Solutions
Author: Lewis and Loftus
Publisher: Addison Wesley
Copyright date: 2005
ISBN number: 0-321-32203-4
Checked out status: false


Title: Computer Science An Overview 8th edition
Author: J. Glenn Brookshear
Publisher: Addison Wesley
Copyright date: 2004
ISBN number: 0-321-24726-4
Checked out status: false


Title: Programming Languages Principles and Paradigms
Author: Tucker and Noonan
Publisher: McGraw-Hill
Copyright date: 2002
ISBN number: 0-07-238111-6
Checked out status: false


Title: Java Software Solutions
Author: John Lewis and William Loftus
Publisher: Addison Wesley
Copyright date: 2005
ISBN number: 0-321-32203-7
Checked out status: false


Title: Computer Science: An Overview, 9th edition
Author: J. Glenn Brookshear
Publisher: Addison Wesley
Copyright date: 2005
ISBN number: 0-321-24726-4
Checked out status: false


Title: Programming Languages: Principles and Paradigms, 2nd edition
Author: Allen Tucker and Robert Noonan
Publisher: McGraw-Hill
Copyright date: 2007
ISBN number: 0-07-238111-6
Checked out status: true


Java Software Solutions,  2005
Programming Languages: Principles and Paradigms, 2nd edition,  Allen Tucker and Robert Noonan,   2007


Testing

Continually test your program until your output looks exactly like the above.


Specifications for Documentation and Format

Normally you will be expected to determine what documentation and formatting will be necessary for your project on your own, with the help of the Style Guide in your Lab manual. Fully correct documentation for both files must follow the javadoc conventions and include:


Submission Submit your program file electronically: In Eclipse, right click on the project and import the files from /home/f85/debbie/cs141/Proj2.

Right click on the file submit.xml and select Run -> 1 Ant Build; Messages will appear in the Console window. Be sure to determine whether you got the Build successful message to ensure that your electronic file submission for this lab was successful.

Honor Code. The honor code applies to all programming done in this course. Reread the CS Department's document: Programming Assignments and the Honor Code.

Start now .. your mileage may vary


Debbie Noonan, debbie@cs.wm.edu
Feb. 13, 2007