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
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