Book - }

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // Book.java Authors: Lewis and Loftus // // Solution to Programming Project 7.3 //******************************************************************** public class Book extends ReadingMatter { protected String author; //----------------------------------------------------------------- // Sets up this book with the specified information. //----------------------------------------------------------------- public Book (String thisTitle, String isbnNum, String auth) { super (thisTitle, isbnNum); author = auth; } //----------------------------------------------------------------- // Sets the author for this book. //----------------------------------------------------------------- public void setAuthor (String auth) { author = auth;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } //-----------------------------------------------------------------// Returns the author of this book. //-----------------------------------------------------------------public String getAuthor() { return author; } //-----------------------------------------------------------------// Returns a description of this book as a string. //-----------------------------------------------------------------public String toString() { return super.toString() + "\t" + author; } //-----------------------------------------------------------------// Prints a message appropriate for this book. //-----------------------------------------------------------------public void content() { super.content(); System.out.println ("Author: " + author); } }...
View Full Document

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online