Question: In this lab you will continue using the other type of conditional statements: the switch-case For switch-case conditional statements, the idea is that you have

 In this lab you will continue using the other type ofconditional statements: the switch-case For switch-case conditional statements, the idea is thatyou have a variable (the switch) that will determine the next course

In this lab you will continue using the other type of conditional statements: the switch-case For switch-case conditional statements, the idea is that you have a variable (the switch) that will determine the next course of action depending on its value (the case) Example structure would be: int soneva riab1c 2; case l: do something break: break; someVariable is your swtich and the program will decide a case according to its value Assignment Write the class SwitchingUpMonths java. This program will be completing exactly the sarie task as Lab3c, however you will need to use switch-case conditional statements instead of if-else That is, your program must: 1. Asks a user to enter the name of a month 2. Confirms the Users input. 3. Prints the abbreviation and number corresponding to that month. The sample output for input February nl.er he monlh You entered February Its abbroviation is FeD P'his i s monl.h number In this lab you will continue using the other type of conditional statements: the switch-case For switch-case conditional statements, the idea is that you have a variable (the switch) that will determine the next course of action depending on its value (the case) Example structure would be: int soneva riab1c 2; case l: do something break: break; someVariable is your swtich and the program will decide a case according to its value Assignment Write the class SwitchingUpMonths java. This program will be completing exactly the sarie task as Lab3c, however you will need to use switch-case conditional statements instead of if-else That is, your program must: 1. Asks a user to enter the name of a month 2. Confirms the Users input. 3. Prints the abbreviation and number corresponding to that month. The sample output for input February nl.er he monlh You entered February Its abbroviation is FeD P'his i s monl.h number 3.29 Lab 6c Switching Up Months Objectives .Use Boolean expressions invn Sting comparison Use String methods substring, toupperCase, equals, and charAt . Use switch program control statement Print out a program and turn it in for eyes on grading Introduction In this lab you will cortiue using the other type of conditional statements: the switch-case For switch-case conditional statements, the idea is that you have a variable (the switch) that will determine the next course of action depending on its value (the case Example structure would be: int soncVariablc2 switch (sonVariablc) case 1: /do soothingf break; case 2: /do sonething else breaki someVariable is your swtich and the program will decide a case according to its value Assignment

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!