Magazine - Returns the editor for this magizine-public String getEditor return editor Returns a description of this magazine as a string-public

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

View Full Document Right Arrow Icon
//******************************************************************** // Magazine.java Authors: Lewis and Loftus // // Solution to Programming Project 7.3 //******************************************************************** public class Magazine extends ReadingMatter { protected String editor; //----------------------------------------------------------------- // Sets up this magazine with the specified information. //----------------------------------------------------------------- public Magazine (String thisTitle, String isbnNum, String ed) { super (thisTitle, isbnNum); editor = ed; } //----------------------------------------------------------------- // Sets the editor for this magazine. //----------------------------------------------------------------- public void setEditor (String ed) { editor = ed; } //-----------------------------------------------------------------
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 editor for this magizine. //-----------------------------------------------------------------public String getEditor() { return editor; } //-----------------------------------------------------------------// Returns a description of this magazine as a string. //-----------------------------------------------------------------public String toString() { String result = super.toString(); result += "\t" + editor; return result; } //-----------------------------------------------------------------// Prints a message appropriate for this magizine. //-----------------------------------------------------------------public void content() { super.content(); System.out.println ("Editor: " + editor); } }...
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