Please heeeelp :(
Using java
Create an array of strings that contains the names of the days of the week: {“Sunday”,”Monday”,”Tuesday”,”Wednesday”,”Thursday”,“Friday”, ”Saturday”}
a. In your main, create a program that asks the user for an integer between 1 and 7, inclusive. Using the array, your program should print out the day of the week corresponding to the number the user entered. Your program must REJECT any number that’s outside this range.
b. On the same line that prints the day’s name, modify your code to also declare if it is or if it is not a weekend.
An example printed output for Q1 could be: “Please enter a number: 4
The day you chose is Wednesday and it is not a weekend.”
“Please enter a number: 7
The day you chose is Saturday and it is a weekend.”
Computers and Technology
Views: 0 Asked: 01-23 03:49:44
On this page you can find the answer to the question of the computers and technology category, and also ask your own question
Other questions in category
- Select the PowerPoint extensions:
- How does a bag represent a variable?
- Suppose that a particular algorithm has time complexity T(n) = 3 \times 2^nT(n)=3×2 n and that e...
- What kind of cable would you use to connect endpoint devices and infrastructure devices in a local a...
- Write a short note on Programmable register
- What is a query? State it's uses.
- 1.Which of the serves as the basis for determining whether an object has moved or not?...
- Hat is the limit of virtual machines that can be connected to a virtual network?...
- 50+ Points Brainlist the best answer
- Write a split_check function that returns the amount that each diner must pay to cover the cost of t...