//******************************************************************** // labquiz4.java Author: Brenneman and YOURNAME // // Driver to test the use of textbook class. //******************************************************************** import cs1.Keyboard; public class labquiz4 { //----------------------------------------------------------------- // Asks the user to enter a title, author, and edition for 2 textbooks //----------------------------------------------------------------- public static void main (String[] args) { System.out.println ("Please enter title for book1:"); String name = Keyboard.readString(); System.out.println ("Please enter the author of " + name); String writer = Keyboard.readString(); System.out.println ("Enter the edition of " + name + ":"); int ed = Keyboard.readInt(); // -- sets up a new textbook ----------------------------------- Textbook book1 = new Textbook(name, writer, ed); System.out.println ("Please enter title for book2:"); name = Keyboard.readString(); System.out.println ("Please enter the author of " + name); writer = Keyboard.readString(); System.out.println ("Enter the edition of " + name + ":"); ed = Keyboard.readInt(); // -- sets up a second textbook -------------------------------- Textbook book2 = new Textbook(name, writer, ed); //******************************************************************** // // YOU ADD CODE HERE. // If the two textbooks are the same, print the title, author and // edition of each book, and say they are the same textbook. // If the two textbooks are not the same, print the title, author and // edition of each book, and say they are different textbook. // // Two textbooks should be the same if they have the same title, // the same author, and the same edition. // You should ignore differences in case. // (i.e. Calculus is the same title as CALCULUS) // //******************************************************************** } // end main } // end class