Question: Copy your class with its 3 instance variables from the last lesson. Add 2 constructors: a constructor with no parameters that initializes the instance variables

Copy your class with its 3 instance variables from the last lesson. Add 2 constructors: a constructor with no parameters that initializes the instance variables to default values and a constructor with 3 parameters to set all of the instance variables to the given parameters. Write a print() method that uses System.out.println to print out all the instance variables. Write a main method that constructs at least 2 objects of your class using the 2 different constructors and then calls their print() methods.
 Copy your class with its 3 instance variables from the last
lesson. Add 2 constructors: a constructor with no parameters that initializes the

Write a print() method that uses System.out.printin to print out all the instance variables. Write a main method that constructs at I objects of your class using the 2 different constructors and then calls their print() methods. (1) D Run Online (1) I summer Ivey Main.java I/ 2. Add a constrictor with no paraseters that initializes the instance variables to default vatues // and a constructor with 3 paraneters to set all of the instance variables to the given paraseters. 1/ 3. Write a print() method that uses System,out. printin to print out all the instance variabtes. // 4. Write a main nethod that constructs at least 2 objects of your class 1/ using the 2 dxfferent constructors and then calls their printi) methods. public static void main(String[l args) // Construct 2 objects of your class to test the 2 constructors. // 3. Write a print() method that uses System.out.println to print out atl the instance variables. // 4. Write a main method that constructs at least 2 objects of your class // using the 2 different constructors and then calls their print() methods. public static void main(Stringll args) 1/ Construct 2 objects of your class to test the 2 constructors If call the objects print() nethods

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!