Reference no: EM132253214
1.) I have to make a class named after any favorite object in the whole world
2.) Then I have to Create Instance Variables (fields)
- Then I have to make at least 3 private instance fields (attributes) for my class
- I must use at least 3 different data types for my fields
3. Then I have to create getter (accessor) and setter (mutator) methods
- Then I must make a getter (accessor) method for each of my instance variables
- Then I have to make a setter (mutator) method for each of my instance variables
4. Next, was to make a Method to display my data
- Then, I have to make a method called display, that simply prints out the values of all instance variables of my object
5. After, that I must create 2 additional methods that my object should normally have, and the methods should print something out and also modify the object in some way. Then, I have to test out both of these method for at least one of my objects.
6. Then, I have to create 2 Constructors
- I then, have to make a default constructor (no parameters) that assigns all my instance variables to default values
- Next, I must make a parameterized constructor that takes all instance variables as parameters, and sets the instance variables to the values provided by the parameters
7. Then, I have to test my program
- After, that I must make a class called Demo.java. This class will contain my main method
- Then, I have to create 2 instances of my class by using the default constructor.
- I then have to call all my objects set methods to assign values to my object
- Next, I have to create 2 instances of your class by using the parameterized constructor
8.) Then, finally I have to put all of my objects in an ArrayList, loop through the array, and call the display method on each object