ITEC 120 Lab Quiz 4 - Tuesday, April 1

Lab Quiz 4 - test to see if two textbooks are the same
Due at the end of lab period.
Submit two files (labquiz4.java and Textbook.java) to your directory on neelix, in a folder called RU03.
Be sure to put your name in the documentation header at the top of each file.

Download these two java files: labquiz4a.java and Textbook.java. (You'll also need the Keyboard class.)

The driver program (labquiz4.java) instantiates two Textbook objects, prompting the user for the title, author, and edition of each textbook.

Your job is to add code to one or both of the files which will test to see if the two textbooks are the same and output appropriate messages. Your message should give the name, title, and edition of each textbook and a message stating whether or not they are the same book.

Two textbooks are the same if they have the same title, author, and edtition. You should ignore differences in case. (for example, Watson is the same author as WATSON.)

Sample run:

Program outputs: Please enter title for book1:
User enters: Calculus
Program outputs: Please enter the author of Calculus
User enters: Swokowski
Program outputs: Enter the edition of Calculus:
User enters: 3
Program outputs: Please enter title for book2:
User enters: CALCULUS
Program outputs: Please enter the author of CALCULUS
User enters: Swokowski
Program outputs: Enter the edition of CALCULUS:
User enters: 3
Program outputs: Calculus by Swokowski, edition 3
is the same book as
CALCULUS by Swokowski, edition 3

Another sample run:

Program outputs: Please enter title for book1:
User enters: HTML 4
Program outputs: Please enter the author of HTML 4
User enters: Lemay
Program outputs: Enter the edition of HTML 4:
User enters: 2
Program outputs: Please enter title for book2:
User enters: HTML 4
Program outputs: Please enter the author of HTML 4
User enters: Lemay
Program outputs: Enter the edition of HTML 4:
User enters: 3
Program outputs: HTML 4 by Lemay, edition 2 and
HTML 4 by Lemay, edition 3 are different textbooks.

NOTE: Points will be given for a well designed, object oriented solution. You should not find yourself changing the code that is already in the file, only adding new code.