National Academy of Engineering

Chapter 10: Inheritance

Introduction

Methods

Instance Variables

Java

Lecture Code

In lecture today, we will build an application that defines classes for the following scenario. A person has a name and a birth year. A baseball player is a person who has a team and a salary. A pitcher is a baseball player who has an ERA. A batter is a baseball player who has a batting average.

Valid XHTML 1.0!