LibraryRecordTest

LibraryRecordTest - /* * File: LibraryRecordTest.java * -*...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * File: LibraryRecordTest.java * ---------------------------- * Simple test of the LibraryRecord class. */ import acm.program.*; i public class LibraryRecordTest extends ConsoleProgram { p public void run() { LibraryRecord book1 = new LibraryRecord("The Art and Science of C", "Eric Roberts", "QA76.73.C15", "Addison-Wesley", 1995); LibraryRecord book2 = new LibraryRecord("Euclid's Elements", "Robert of Chester", "QA31.B87", "none", 1250, false); println(book1); println(book2); } /** * The LibraryRecord class keeps track of the following pieces of data * about a library book: title, author, catalog number, publisher, year * of publication, and a flag indicating whether the book is circulating. */ public class LibraryRecord { /** * Creates a new LibraryRecord object with the specified information. * * @param title The title of the book * @param author The author's name * @param number The catalog number as a string * @param publisher The publisher's name * @param year The year of publication
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/26/2011 for the course CS 1md3 taught by Professor Skip during the Spring '11 term at McMaster University.

Page1 / 3

LibraryRecordTest - /* * File: LibraryRecordTest.java * -*...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online