Write a program that prompts the user to enter a year and the first three letters of
Question:
Write a program that prompts the user to enter a year and the first three letters of a month name (with the first letter in uppercase) and displays the number of days in the month. Here is a sample run:
Transcribed Image Text:
Enter a year: 2001 Enter a month: Jan Jan 2001 has 31 days JEnter JEnter Enter a year: 2016 Enter a month: Feb Jan 2016 has 29 days JEnter JEnter
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 50% (14 reviews)
Program Plan Create a class called DaysOfMonth Initialize the main method with variable year days as integer and month as string Create a Scanner clas...View the full answer
Answered By
PALASH JHANWAR
I am a Chartered Accountant with AIR 45 in CA - IPCC. I am a Merit Holder ( B.Com ). The following is my educational details.
PLEASE ACCESS MY RESUME FROM THE FOLLOWING LINK: https://drive.google.com/file/d/1hYR1uch-ff6MRC_cDB07K6VqY9kQ3SFL/view?usp=sharing
3.80+
3+ Reviews
10+ Question Solved
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Question Posted:
Students also viewed these Computer science questions
-
Programming Exercise 6.39 gives a method for testing whether three points are on the same line.Write the following method to test whether all the points in the array points are on the same...
-
Write a program that prompts the user to enter two strings and tests whether the second string is a substring of the first string. (Don?t use the indexOf method in the String class.) Analyze the time...
-
Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, if the user entered month 2 and year 2012, the program should display that...
-
On what date is CGT for 2020-21 normally due for payment?
-
Suppose that we have a knapsack with total capacity of W kg. We also have n items where item j has mass wj. The knapsack problem asks for a subset of these n items with the largest possible total...
-
How could this policy have been introduced so that it had a better chance of succeeding? LO.1
-
Explain corporate governance.
-
We offer a guitar at every price point for every skill level, explains Kevin Lello, vice president of marketing at Washburn Guitars. Washburn is one of the most prestigious guitar manufacturers in...
-
The budget for April 2019 and the following information is provided: The cash balance on 1 April 2019 is $ 52,000. The actual and expected sales of the company are as follows: March $ 168,000 April $...
-
A two dimensional quadrupole consisting of four charges +q, -q, +q and -q located at the points (a2,0),(-a2,0),(0,a2) and (0.-a2). calculate the quadrupole moment tensor [12ga (a) -12ga o [1qa -12ga...
-
Rewrite the Programming Exercise 3.9 by entering the ISBN number as a string. Data from Exercise 3.9 An ISBN-10 (International Standard Book Number) consists of 10 digits: d 1 d 2 d 3 d 4 d 5 d 6 d 7...
-
Write a program that displays a random uppercase letter using the Math.random() method.
-
In purchasing, a PO is understood to be what?
-
Macon Timber Company established a \(\$ 150\) petty cash fund on January 1, 2012. Required a. Is the establishment of the petty cash fund an asset source, use, or exchange transaction? b. Record the...
-
Following is a bank reconciliation for Holt's Sandwich Shop for May 31, 2012: Because of limited funds, Holt's employed only one accountant who was responsible for receiving cash, recording receipts...
-
For each of the following situations, fill in the blank with FIFO, LIFO, or weighted average. a. b. c. d. e. f. would produce the highest amount of net income in an inflationary environment. would...
-
Archer Contracting repaved 50 miles of two-lane county roadway with a crew of six employees. This crew worked 8 days and used \($7,000\) worth of paving material. Nearby, Bronson Construction repaved...
-
An insurance company has the following profitability analysis of its services: The fixed costs are distributed equally among the services and are not avoidable if one of the services is dropped. What...
-
Stephanie and Alfred moved to Missouri after 15 years of living in Oklahoma. All during the time they were together in Oklahoma, they held themselves out as husband and wife, lived together, and...
-
-4 1 9. Let A = Find A-1, (A") and verify that (A")= (A-1)".
-
Write a program that displays a cylinder, as shown in Figure 31.54b. Use dashed strokes to draw the dashed arc. I Exercise31_16 (b)
-
Write a program that displays a circle filled with a gradient color to animate a sun and display light rays coming out from the sun using dashed lines, as shown in Figure 31.54a. Evercise 1_15 (a)
-
Write a program that enables the user to scale and rotate the STOP sign, as shown in Figure 31.53. The user can press the UP/DOWN arrow key to increase/decrease the size and press the RIGHT/LEFT...
-
C. 1) If the interest rates are .07 and .05 in Argentina and Canada respectively, what will happen to the peso versus the Canadian dollar, if presently they exchange as 10 pesos for one dollar? 2)...
-
Project ABC Initial End-of-Year Investment Cash Flows for years 1-3, respectively $36,000 $20,000 30,000 20,000 WACC = 13% What is the NPV? (Please round to the nearest dollar and do not enter the...
-
Vanscoy Bank pays 6.4% simple interest on its investment accounts. If Vade Bank pays interest on its accounts compounded annually, what rate should the bank set if it wants to match Vanscoy Bank over...
Study smarter with the SolutionInn App