Question: Use nested for loops to update the attributes in Java 12. Now we will add a mutator method that sets the date to something else.
Use nested for loops to update the attributes in Java
12. Now we will add a mutator method that sets the date to something else. 13. Write a method public void setDate(int dayIn, int monthIn, int yearIn){} 14. Update the attributes with these values only if it is a valid date. Otherwise print an error statement using: System.out.println()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
