Question: 1. Write a Java program that prompts the user to enter the day of the week as an integer, 0 for Sunday, 1 for Monday,

1. Write a Java program that prompts the user to enter the day of the week as an integer, 0 for Sunday, 1 for Monday, etc, 6 for Saturday. Depending on the input day, produce different inputs as follows:

Input 0, 6; respond : "No service on Weekends."

Input 1 , 2, 5; respond: "Reduced fare in effect."

Input 3, 4; respond: "Full fare in effect."

For any other input, respond: "Incorrect input."

1. Write a Java program that prompts the user to enter the

2. What is the value of the logical expression true && true || true && false ?

Linux5:~/CS1/Week6$ java Day Enter the week day as an integer Sun-0, Mon-1, etc., Sat-6): 3 Full fare in effect linux5: /CS1/Week6S java Day Enter the week day as an integer Sun-0, Mon-1, etc., Sat-6): 6 No service on Weekends. linux5: /CS1/Week6S java Day Enter the week day as an integer Sun-0, Mon-1, etc., Sat-6): 2 Reduced fares in effect. linux5: /CS1/Week6S java Day Enter the week day as an integer(Sun-0, Mon-1, etc., Sat-6): 7 Incorrect input Linux5:~CS1/Week6S

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!