Today we continued chapter 2 in the book. This program has two .java files that need to be included in the project, they are:
|
Same as last posting with two instances, but now we call two new methods in the IceSkater class. One sends messages back, another print doesn't get any messages sent and doesn't return anything, it does everything it needs to do in the method.
|
Pond.java
|
| And the IceSkater.java has a new instance field and a few new methods. returnWeight and print are two new methods as well as the constructor IceSkater(int, String) which sets up the class.
|
IceSkater.java
|