Question: ( software measurement and testing ) please solve the first question ( the drawing ) Consider the following code for method nextDate(): 1 / Method


Consider the following code for method nextDate(): 1 / Method nextDate keeps asking the user to enter day, month, and year 2 until the entered values are ok. 3 4 private static void nextDate() 5 boolean dayOK, monthok, yearok; 6 int day, month, year; 7 8 e dot 9 System.out.print("Enter day (1-31): "); 10 Scanner 3 = new Scanner(System.in); day = s.nextInt(); 12 System.out.print("Enter month (1-12): "); 13 month = s.nextInt (); 14 System.out.print("Enter year (1900-2021): "); 15 year = s.nextInt (); 16 17 18 19 20 21 22 23 if (
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
