Question: Please code should be in Java only CSE 1321L: Programming and Problem Solving I Lab Lab 4 Selection Structures What students will learn: - Logic

Please code should be in Java only

CSE 1321L: Programming and Problem Solving I Lab Lab 4 Selection Structures What students will learn: - Logic using selection structures (if/else and switch statements) - Review of I/O (input and output) - Review of reading input from the user and storing it into variables - Review of doing basic calculations with variables to generate a solution Overview: In this lab, youre going to focus on if, if-else, and else statements, as well as switch statements. This lab is all about logic so youll need to think through the problem. Lab 4A is designed to be a warm up to get you started. Labs 4B and 4C are a little harder, and Lab 4D is the challenge question (for an extra 10 points). As with previous weeks, all labs should have the appropriate class names and file names, Lab4A, Lab4B, Lab4C and Lab4D (.java, .cs, .cpp). You are not required to use repl.it for this set of labs unless you want more practice with it. Lab4A: I hate Mondays Were going to create special messages for days of the week. For this lab, you will create a program that asks the user for a day of the week. If the user input is Monday, Wednesday or Friday, the program will respond with a special message for each day. For other days, the program will print the message Its another day of the week. Remember, the class name should be Lab4A. An example run is shown below. The user input is in bold. Sample run #1: Enter the day: Monday Sounds like someone has a case of the Mondays! Sample run #2: Enter the day: Wednesday It's hump day! El ombligo! Sample run #3: Enter the day: Friday Finally. It's Friday! Sample run #4: Enter the day: Tuesday It's another day of the week. Page 2 of 3 Lab4B: Takin Care of Business For this lab, were going to determine how much an employee earns in a week. You will write a program that prompts the user for the number of hours worked per week (as an integer value) and prints out the amount of money earned in a week. Your calculations should be based on the following parameters: - Standard work hours per week is 40 hours. - Hourly pay rate is $15.00 per hour. - Overtime hours are paid an additional $10.00 per hour (that is a total of $25.00 per hour) A sample run is shown below. User input is shown in bold. Sample run #1: Number of hours this week: 35 Earnings: $525 Sample run #2: Number of hours this week: 45 Earnings: $725 Sample run #3: Number of hours this week: 60 Earnings: $1100 Lab4C: Just a moment! Switch statements are usually used as a mechanism to route messages to systems. For example, if the user is presented with a menu of options (i.e. Press 1 for a list of movies, Press 2 for show times, etc. ) the system will switch on the users input and run a set of code to handle their choice. We will practice this concept by creating a menu of options that responds to the users choice. For this program, you will create a menu that presents the user with 3 options as shown in the sample run below. Depending on the user input, the program will display output that should look like the sample run below. The user input is shown in bold. The program should also handle input values less than 1 and greater than 3 (shown in Sample run #4).

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!