Thirty days hath September April, June, and November All the rest have thirty-one with February's 28...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Thirty days hath September April, June, and November All the rest have thirty-one with February's 28 to make it fun. Leap Year happening one in four, Gives February one day more. Write a program that does the following: 1. Prompts the user for a month string (January, February, ...). Validate the input month string against an array of month's, and prompt the user again if the String entered is not a valid month. Note: You may want to use an Enum. 2. Prompts the user for a year (e.g. 2016). 3. For months with 31 days, output the phrase "all the rest have thirty-one". For September, the phrase "Thirty days hath September. For April, June, and November the phrase "April, June, and November". For February, if the year is not a leap year, output the phrase "with February's 28 to make it fun.". If the use did supply a leap year (and the user supplied February as the month), output the phrase "Leap Year happening one in four, Gives February one day more." 4.Note. Since this chapter covers Arrays and ArrayList objects, I expect your solution to utilize these facilities. The specifics of this is up to you (after all, this is your program :)), so I am making specific requirements regarding this, other than you show learnings from chapter 7. Please make sure you comment your code thoroughly. You are expected to use javadoc comments at the top of your code and above every method other than main. Refer to examples in the text or research javadoc on line if you have questions. The code should be nicely formatted and should use proper variables. Thirty days hath September April, June, and November All the rest have thirty-one with February's 28 to make it fun. Leap Year happening one in four, Gives February one day more. Write a program that does the following: 1. Prompts the user for a month string (January, February, ...). Validate the input month string against an array of month's, and prompt the user again if the String entered is not a valid month. Note: You may want to use an Enum. 2. Prompts the user for a year (e.g. 2016). 3. For months with 31 days, output the phrase "all the rest have thirty-one". For September, the phrase "Thirty days hath September. For April, June, and November the phrase "April, June, and November". For February, if the year is not a leap year, output the phrase "with February's 28 to make it fun.". If the use did supply a leap year (and the user supplied February as the month), output the phrase "Leap Year happening one in four, Gives February one day more." 4.Note. Since this chapter covers Arrays and ArrayList objects, I expect your solution to utilize these facilities. The specifics of this is up to you (after all, this is your program :)), so I am making specific requirements regarding this, other than you show learnings from chapter 7. Please make sure you comment your code thoroughly. You are expected to use javadoc comments at the top of your code and above every method other than main. Refer to examples in the text or research javadoc on line if you have questions. The code should be nicely formatted and should use proper variables.
Expert Answer:
Answer rating: 100% (QA)
Heres an implementation in Java that meets the requirements import javautilScanne r public class Mon... View the full answer
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these programming questions
-
For this program you will write a program that will do the following: Read in the numbers from the text file (Values.txt) and store those values in an array. You will declare the array of size 20....
-
Write a program that displays all the prime numbers less than 120 in decreasing order. Use the StackOfIntegers class to store the prime numbers (e.g., 2, 3, 5,... ) and retrieve and display them in...
-
In this project, we will write a program that controls a quiz show, much like the many popular TV shows. The program will read in a group of questions and their multiple choice answers, storing them...
-
A 2-in dia. steel bar is subjected to the loading indicated. Locate and estimate the maximum shear stress in the weld throat. F T____ 2 ...... kips 15 kip ·in 6 in in 2-in dia.
-
Identify the steps involved in the strategic management process.
-
If the piston rod of the hydraulic cylinder C has a constant upward velocity of 0.5 m/s, calculate the acceleration of point D for the position where is 45. D y A C BO 300 mm 100 mm
-
An explosion in an LNG storage tank in the process of being repaired could have occurred as the result of static electricity, malfunctioning electrical equipment, an open flame in contact with the...
-
The following selected transactions were complete by Burton Company during July of the current year. Burton Company uses the periodic inventory system. July 2. Purchased $24,000 of merchandise on...
-
The Golf Academy books show that at the beginning of the year ( 1 / 1 / 2 0 1 6 , the beginning balance in accounts receivable was $ 8 , 0 0 0 . During the year the firm reported sales revenue of $ 4...
-
Which series has the highest beta. BraveNewCoin Liquid Index for Bitcoin 1D BNC Trading Brave Ne Yellow Green Blue Orange
-
3 The path r(t) = (t - sin t)i + (1 -cos t) j describes motion on the cycloid x=t-sint, y = 1-cost. Find the particle's velocity and acceleration vectors at t= and sketch them as vectors on the...
-
Divide the class into teams of five. Some teams are asked to defend the position that the proposed plan is fair and reasonable; other teams are asked to argue that this is a dangerous proposal that...
-
Companies have recently been created, such as Social Intelligence, that offer pre-employment social media screening. Using an Internet search, identify some of the companies offering this service....
-
Why do companies such as Google let employees play volleyball, roller hockey, and other games at work? Is there a business reason why employees are permitted to play games at the workplace? Wouldnt...
-
OSHA has been criticized for its inadequate beryllium exposure standards. The agency did try to push through lower exposure limits in the l970s, but companies stopped passage of the new standards by...
-
It is ironic that OSHAs own officers were exposed to unsafe conditions. More than irony, some people are questioning not only the standards, but the safety culture within OSHA. Select representatives...
-
What kind of formal decision making model does your organization have in place that allows risk- related information to be obtained or generated by the individuals in your organization in order to...
-
The MIT Sloan School of Management is one of the leading business schools in the U.S. The following table contains the tuition data for the masters program in the Sloan School of Management. a. Use...
-
Write a program to enter employee data, including Social Security number and salary, into an array. The maximum number of employees is 100, but your program should also work for any number of...
-
Even though a binary file is not a text file, it can contain embedded text. To find out if this is the case, write a program that will open a binary file and read it one byte at a time. Display the...
-
Consider the previous question, but include + or letter grades. A+ is 4.25, A is 3.75, B+ is 3.25, B is 2.75, and so on. a. Why cant we use one switch statement with no other conditionals to convert...
-
Which of Yellows statements regarding the factors affecting the selection of a trading strategy is correct? A. Statement 1 B. Statement 2 C. Statement 3 Robert Harding is a portfolio manager at...
-
To fill the remaining portion of the ABC order, Yellow is using: A. an arrival price trading strategy. B. a TWAP participation strategy. C. a VWAP participation strategy. Robert Harding is a...
-
Given the parameters for the benchmark given by Harding, Yellow should recommend a benchmark that is based on the: A. arrival price. B. time-weighted average price. C. volume-weighted average price....
Study smarter with the SolutionInn App