Object Concepts and Terminology-2

Frequently used methods for class types getclass

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ) extends Product { private String author, subject; Book( ) { super( ); } public String toString( ) { return = super.toString( ) + “Author: “ + author + “\n” + “Subject: “ + subject; } } Superclasses, Subclasses, and Polymorphism Polymorphism TreaDng objects of different types as if they were the same by referring to a superclass that is common to all these objects A few notes about p...
View Full Document

This note was uploaded on 03/08/2014 for the course CIS 304 taught by Professor Verbrugge during the Spring '08 term at Cal Poly Pomona.

Ask a homework question - tutors are online