Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

-DO the following assignments in java language programming... CS 111 Lab 5.dock Microsoft Word File Homeert Page Layout ReferencesMaings ReviewVew Find , e Replace Select-

-DO the following assignments in java language programming...

image text in transcribedimage text in transcribed

CS 111 Lab 5.dock Microsoft Word File Homeert Page Layout ReferencesMaings ReviewVew Find , e Replace Select- Cut Copy Subtitle Change Styles Normal No Spaci Heading 1 Heading 2 Heading 3 Title Clipboard Font Paragraph Styles Editing Programming Activity Description: Write a program that prompts the userto enterthe month and year and displays the number of days in the month. Note:that in a leap year, there are 29 days in February, otherwise, there are 28 days. Use a switch statement to determine name of month and days in that month, in the case of February, decide whether there are 28 days or 29 days (if the year entered is a leap year, then there are 29 days in February, otherwise, there are 28 days). . Do not forget to include break; at the end of each case .Do not forget to include a default: for invalid month entry If you got an eror message, saying that you need to initialize a certain variable, if that variable is an int, initialize it to 0 (e g int x-0); if the variable is a double, initialize it to 0.0 (e.g. double x = 0.0); if the variable is a String, initialize it to an empty string (e.g. String x = ""). You can name your program DaysMonthYear.java nter the month (enter 1 for Jan, 2 for Feb, etc Enter the year 2016 February 2016 had 29 days Enter the month (enter 1 for Jan, 2 for Feb, etc): 3 Enter the year 2015 March 2015 had 31 days 2 Enter the month (ente1 forJn, 2 forFeb, etc): 2 Enter the year 2017 February 2017 had 28 days Page: 1 ot 1 Words: 312English (U.S.) O Type here to search , ENG 10:49 PM 11/15/2017 ^

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions

Question

Describe the role of the stakeholder, and list several examples.

Answered: 1 week ago

Question

=+ Are unions company-wide, regional, or national?

Answered: 1 week ago