Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Tosin on points 3 poi forte como desde pment the following propanin stened Day of the Week javat you will lead sponse to this question

image text in transcribed
image text in transcribed
Tosin on points 3 poi forte como desde pment the following propanin stened Day of the Week javat you will lead sponse to this question when you are done - Dectare geables and to and respectively red day of the Week dryofTheMonth and firstDayOfTheMonth. Remember to comment each Based on a role see below for de points . Oncare Sistemes point Dovre blowing message on the screen oase enter an integreresenting the date is the current mont 1 point de from the user and store in variable y The Month 1 point Decrement dayOfTheMo by to present the fact that our formats will assume that we numbers toys in a month starting at O instead of 1. 1 point Doby the following message on the What was the trade of the Ester for Monday 1 for Tuesday 1 point Radio and stone firstDayOfTheMonth 1 point increment dorthe Month by festDayOfTheMonth 1 point Store the bledayorWeek de result of computing the model of the contents of dayOfTheMonth by 7.1 point Diply the following message on the screen days. Make sure that the next formation that will be displayed will be on the same line, 1 point Perform the following conditional actions points TestirayoTheWeek is display Monday - Testit dayOfTheWeek is display berday Test ideyorTheWeek 2. tiply Wednesday - Testi dayoftheweeks day Thursday . Testi dayorWeeks 4 day Friday Test day of the Week is, is by Saturday Testit duyOfWeekly Sunday Please note that the above tests may be independent of one another serangement or nested. Implement your program using serially arranged conditional statements. vams instructions Implement the following program in a file named DayoTheWeek java that you will upload as response to this question when you are dones - Declare three integer variables all initialed to and respectively named dayOfTheWoek dayorTheMonth, and firstDayOfTheMonth. Remember to comment each based on its role (see below for details). 3 points - Declare & initialize a Scanner variable nameds. 1 point Display the following message on the screen "Please enter an integer representing the date in the current month 1 point Read an int value from the user and store it in variable dayOfTheMonth 1 point Decrement dayOfTheMonth by 1 to represent the fact that our formula will assume that we numbers days in a month starting at O instead of 1. 1 point Display the following message on the screen "What was the first day of the month? Enter for Monday, 1 for Tuesday... 1 point . Read an int value from the user and store in variable firstDayOfTheMonth 1 point Increment day or The Month by firstDayOfTheMonth 1 point Store in the variable dayOfTheWeek the result of computing the modulo of the contents of dayOfTheMonth by 7.1 point Display the following message on the screen "Today is Make sure that the next information that will be displayed will be on the same line 1 point Perform the following conditional actions: 3 points Test if dayorTheWeek is if it is display "Monday: Test if dayOfTheWeek is 1. If it is display Tuesday Test if dayOfTheWeek is 2. if it is display "Wednesday Testif dayOfTheWeek is 3, if it is display "Thursday Test if dayOfTheWeek is 4, if it is display "Friday Test if dayOfTheWeek is 5, if it is display Saturday Test if dayOfTheWeek is , if it is display Sunday Please note that the above tests may be independent of one another serial arrangement) or nested. Implement your program using serially arranged conditional statements

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions