Java
TOPIC 36 – CONSTRUCTORS I
LESSON WORK
QUESTION #1 – SHORT
ANSWER QUESTIONS
Do the Short
Answer Questions – Basic Objects from Java OOP Exercises I.
Do
the Short Answer Questions – Constructors (Part 1) from Java OOP Exercises I.
QUESTION
#2 – CIRCLE CLASS
Do the Circle
class work from Java OOP Exercises I.
QUESTION
#3 – CARD CLASS
CLASS DESCRIPTION
Do the Card
class work from Java OOP Exercises I.
QUESTION #4 – YOUR OWN CLASS
CLASS DESCRIPTION
Create a class of your choice. This
might be a Planet, a SpaceShip, a BattleShip or anything that you want. It's really up to you. Think of at least three pieces of data that
would be needed for such an object.
Those will be the instance variables (datafields). Include a constructor that gets values for
all data fields.
WORK
Create the class.
Test it.
|