Question: *JAVA* Daily chores are specified in the table mentioned below with one character each representing a day and the chores for that day. Write a

*JAVA*

Daily chores are specified in the table mentioned below with one character each representing a day and the chores for that day. Write a program that, given a single character input, will print the day and chores to be performed on that day. If the character is not one of the pre-specified one, the program should print You have entered an invalid input. You may assume that a user will only enter a single character as an input. Your program should be case in-sensitive i.e. both M and m are correct inputs. (a) Use an if/else statement (b) Using a Switch statement

SR Input Day Chore message

1 M Monday Today's Monday. Take out Garbage.

2 T Tuesday Today's Tuesday. Move car.

3 W Wednesday Today's Wednesday. Recycle bag out.

4 J Thursday Today's Thursday. No chore.

5 F Friday Today's Friday. Take garbage out.

6 Any other input You have entered an invalid input.

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!