Slides0204 - COP 3330 Slides 2/4 Topics Container Objects...

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

View Full Document Right Arrow Icon
Slides 2/4 COP 3330
Background image of page 1

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

View Full DocumentRight Arrow Icon
Topics Container Objects Example Inheritance basics
Background image of page 2
Example Create a calculator that acts on rational numbers
Background image of page 3

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

View Full DocumentRight Arrow Icon
Inheritance Basics Inheritance defines an is-a relationship Example - Every cat is a mammal - Every mammal is an animal - Every animal is a living organism
Background image of page 4
Inheritance Basics What about multiple inheritance? Example - Dogs are mammals - Dogs are pets Multiple inheritance can be confusing and a big hassle so Java disallows it (uses interfaces instead)
Background image of page 5

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

View Full DocumentRight Arrow Icon
The extends Keyword The extends keyword means that this class is a subclass of another class
Background image of page 6
Background image of page 7

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

View Full DocumentRight Arrow Icon
Background image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/09/2010 for the course CS COP 3330 taught by Professor Douglass during the Spring '09 term at University of Central Florida.

Page1 / 8

Slides0204 - COP 3330 Slides 2/4 Topics Container Objects...

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

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