Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java and please explain each step Q1 (60 marks): Create two arrays as defined below that contain the information on the months of the year:

image text in transcribed

java and please explain each step

Q1 (60 marks): Create two arrays as defined below that contain the information on the months of the year: months = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} daysOfMonth = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} Note that the number of days of a month x is saved in same index of x in the array daysOfMonth. a. In your main, create a program that asks the user for two integer values between 1 and 12, inclusive. Using the arrays, your program should print out the name of the months and number of days in them corresponding to the numbers the user entered. Your program must REJECT any numbers that's outside this range. b. On a new line, print which month comes before the other. An example printed output for Q1 could be: "Please enter two numbers: 12 3 The months you chose are December which is has 31 days, and March which has 31 days. March comes before December

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

Recommended Textbook for

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions

Question

Let 0 Answered: 1 week ago

Answered: 1 week ago

Question

Which team solution is more likely to be pursued and why?

Answered: 1 week ago

Question

Did the team members feel that their work mattered

Answered: 1 week ago