# Introduction to Objects
1. Create a Duck class in your java project. Add its member variables and methods to match the picture above. Now add the code for the constructor of the Duck class: Duck(String favoriteFood, int numberOfFriends) { this.favoriteFood = favoriteFood; this.numberOfFriends = numberOfFriends; } 2. Now pick your favorite animal and describe it with at least 2 member variables and 2 methods.Create a java class for your animal including: member variables methods(with sysouts) a constructor that sets the member variables
Create a new java class. This will be a "runner" or "driver" class, so it will need a main method.
In your runner class, create a Duck object (instance) by calling its constructor as follows: Duck daffy = new Duck("donuts",5); Now you have a duck object, you can make it quack: daffy.quack();
Now create an instance of your animal (Hint: see step 5 above) and call its methods.