Question: // Add necessary import statements public class Lab5 { public static void main(String[] args) { // YOU DO THIS: Declare and Initialize an array IN

 // Add necessary import statements public class Lab5 { public static

// Add necessary import statements public class Lab5 { public static void main(String[] args) { // YOU DO THIS: Declare and Initialize an array IN ONE LINE to // hold the days of the month for each month // 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 // YOU DO THIS: Declare and Initialize an array IN ONE LINE to // hold the month names... // "January", "February", "March", "April", "May", "June", "July" // "August", "September", "October", "November", "December" // YOU DO THIS: Use a loop to read in all dates from the given file and parse into // 3 int arrays, which will hold the current month, day, and year // (a single 2D int array can also be used) // DO NOT ASSUME THERE ARE ONLY 7 DATES // YOU DO THIS: Use ANOTHER Loop that will display the CURRENT date in the correct format // followed by the SUBSEQUENT date in the correct format, followed by a blank line. /* Things to consider: -If it is Dec 31, subsequent date is January 1, "year + 1" -If it is not Dec but is last day of the month, subsequent date is "next month" 1, year -Otherwise, just increase the day */ // Don't forget to close the file! } // end main } // end class

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!