The Animal class
In order to store information about animals, we will create a class named Animal
. This class will be very simple, but it will have to be shared by both the client and the server. Indeed, the server will serialize several instances of this class, which means that the client will need this class to be able to unserialize it.
So, let's see how this class looks:
package zooKeeper; class Animal { public var name : String; public var number : Int; public function new() { name = ""; number = 0; } }