Objects that inherit from one another use the _______ relationship.
“is-a” relationship.
Means a method or variable will be available to all other classes
Can more than one class in the parent hierarchy be abstract?
Yes!
Which base class is correct when approaching an object design?
1. Game Piece
2. GamePiece
3. \Game”PieCe!”
#2 —> GamePiece
Define A protected keyword
Give an example of a four level class hierarchy
Mammal type of animal, dog is a type of mammal, and a poodle is a type of dog
Game Pieces on the board share these certain common properties EXCEPT
1. Teams
2. One Letter Abbreviations for Display
3. Name
4. Location on the game board
5. Color and Design
#5 —> Color and Design
Define Base Class
Class that has common methods and properties
Define the implements keyword
Shows the java class is supporting all the methods of a particular interface
In the game piece, how many static constants need to be defined to tell you the possible teams the piece can belong to?
Two static Constants
Define a concrete class
A class that implements all abstract methods and can be created within a new keyword
Define JButton
A swing class that represents a button on the GUI screen
Within the Jail Break game we might create an instance of a GamePiece like this:
GamePiece piece = new GamePiece();
True or False?
True! This is a nice starting point - with this line of code, you can now manage all pieces in a common way by setting the myCol, myRow, myPlayerType, MyAbbreviation, and myName properties
What does that base class AbstractGamePiece contain?
Common piece properties and methods
Define java.lang.object
The java base class from which all other objects are derived