Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a test plan for the followng program below. public class Exercise 0 3 _ 1 1 { public static void main ( String [
Create a test plan for the followng program below.
public class Exercise
public static void mainString args
java.util.Scanner input new java.util.ScannerSystemin;
Prompt the user to enter input
System.out.print
"Enter a month in the year eg for Jan: ;
int month input.nextInt;
System.out.printEnter a year: ;
int year input.nextInt;
int numberOfDaysInMonth ;
switch month
case :
System.out.printJanuary year;
numberOfDaysInMonth ;
break;
case :
System.out.printFebruary year;
if year year && year
numberOfDaysInMonth ;
else
numberOfDaysInMonth ;
break;
case :
System.out.printMarch year;
numberOfDaysInMonth ;
break;
case :
System.out.printApril year;
numberOfDaysInMonth ;
break;
case :
System.out.printMay year;
numberOfDaysInMonth ;
break;
case :
System.out.printJune year;
numberOfDaysInMonth ;
break;
case :
System.out.printJuly year;
numberOfDaysInMonth ;
break;
case :
System.out.printAugust year;
numberOfDaysInMonth ;
break;
case :
System.out.printSeptember year;
numberOfDaysInMonth ;
break;
case :
System.out.printOctober year;
numberOfDaysInMonth ;
break;
case :
System.out.printNovember year;
numberOfDaysInMonth ;
break;
case :
System.out.printDecember year;
numberOfDaysInMonth ;
break;
System.out.print has numberOfDaysInMonth days";
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started