Object Concepts and Terminology-2

Syntax extends classname examples class book

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: lass. Names for the new class include derived, child, or subclass. Names for the exisDng class include base class, parent class, or superclass. Syntax: extends classname Examples: class Book extends Product; class Car extends Vehicle IntroducDon to Inheritance Advantages •  Fields, constructors, and methods are automaDcally passed to the child class without copying and pasDng (i.e., duplicaDng) code •  Speeds development •  Improves quality by reducing the need for tesDng •  Allows changes only where necessary...
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