Task1: Enter a valid date of birth and print it in different forms. Your program prompts...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Task1: Enter a valid date of birth and print it in different forms. Your program prompts the user to enter the date-of-birth as date, month and year. Then the program prints the date-of-birth in 2 different ways. A sample scenario is shown in the box below. User inputs are bolded and underlined for convenience. Enter your date of birth (dd): 1 Enter month (mm): 2 Enter the year (yyyy): 1950 *** You were born on the 1st day of February 1950 In words, you were born on day One in February of 1950 ***************** ******** ******* **********: Note 1.1: You must print an appropriate suffix when printing the date on linel - for example, the suffix is "st" if the date is 1, "nd" if the date is 2, "rd" if it is 3, "th" if it is 4, and so on. The date on line 2 is printed in words (e.g. One if date is 1, Two if date is 2 and so on). Note 1.2: the line of stars must be printed inside a function. It must print n line of stars, where n is an int value given as input to the function. You must use the following name and prototype for this function: Function Name: printLine60Stars Return Type: void Parameter: int Task1: Enter a valid date of birth and print it in different forms. Your program prompts the user to enter the date-of-birth as date, month and year. Then the program prints the date-of-birth in 2 different ways. A sample scenario is shown in the box below. User inputs are bolded and underlined for convenience. Enter your date of birth (dd): 1 Enter month (mm): 2 Enter the year (yyyy): 1950 *** You were born on the 1st day of February 1950 In words, you were born on day One in February of 1950 ***************** ******** ******* **********: Note 1.1: You must print an appropriate suffix when printing the date on linel - for example, the suffix is "st" if the date is 1, "nd" if the date is 2, "rd" if it is 3, "th" if it is 4, and so on. The date on line 2 is printed in words (e.g. One if date is 1, Two if date is 2 and so on). Note 1.2: the line of stars must be printed inside a function. It must print n line of stars, where n is an int value given as input to the function. You must use the following name and prototype for this function: Function Name: printLine60Stars Return Type: void Parameter: int
Expert Answer:
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these accounting questions
-
Write a program that prompts the user to enter an integer for today?s day of the week (Sunday is 0, Monday is 1, ?, and Saturday is 6). Also prompt the user to enter the number of days after today...
-
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...
-
Write a program that prompts the user to enter the exchange rate from currency in U.S. dollars to Chinese RMB. Prompt the user to enter 0 to convert from U.S. dollars to Chinese RMB and 1 to convert...
-
The Wall Street Journal Corporate Perceptions Study 2011 surveyed readers and asked how each rated the quality of management and the reputation of the company for over 250 worldwide corporations....
-
Early management theorists believed that organizations should strive to be logical and rational, with a place for everything and everything in its place. Discuss the pros and cons of this approach...
-
Explain the rationale for the factors (functional integration, centralization of management, and economies of scale) used to determine whether two or more businesses form a unitary group under the...
-
Let \(w=e^{\sigma z-\frac{1}{2} t^{2}}\), where \(z\) is a stardard Wiener process. Find the equation governing \(w\).
-
As a manager of a department store, you must deal with a variety of business transactions. Place the letter of each of the following transactions next to the effect it has on the accounting equation....
-
According to a theory of economics, government revenue can be given by the function x(x-100)(x-160) f(x)= 240 , 0 x 100, where f(x) is government revenue (in billions of dollars) from a tax rate of x...
-
The following adjusted revenue and expense accounts appeared in the accounting records of Pashi, Inc., an accrual basis taxpayer, for the year ended December 31, Year 2. Revenues Net sales $3,000,000...
-
if the value of the magnetic flux density at point X is B then the value of the magnetic flux density at point is .. . 12 b. 12 B . 2 d. 8
-
Chipotle has cash of $899 million, inventory of $35 million, total current assets of $1,175 million, and total current liabilities of $921 million on its latest balance sheet. Compute its quick ratio.
-
The listing price is $5,500,000. The property produces $387,000 each year in net operating income (NOI) that is expected to increase by 3% each year over the next 5 years. The bank will make a loan...
-
Pichon Sports is expanding and needs $55 million to help fund this growth. The company estimates it can sell new shares of stock for $44 per share. The underwriters have agreed to a spread of 7...
-
Natural Colour Co. wants to invest in a bond with par value of $ 1000 that offers 10% coupons paid semi-annually. The bond has 15 years to maturity and has a yield to maturity of 9%. If the current...
-
These are finance questions, please help > Question 30 2.5 pts A firm has a target debt-equity ratio of 0.40. Its cost of equity is 11.5% and its cost of debt (pre- tax) is 7.5%. The corporate tax...
-
According to the video on HSBC and Culture, in Japan Multiple Choice People believe chrysanthemums are associated with funerals and sadness. If a client gets a hole in one while playing golf, they...
-
How is use of the word consistent helpful in fraud reports?
-
Write a program to display the text Java is fun and Java is powerful alternately with a mouse click.
-
Use a while loop to find the smallest integer n such that n2 is greater than 12,000.
-
Write a method that shuffles the rows in a two-dimensional int array using the following header: public static void shuffle(int[][] m) Write a test program that shuffles the following matrix: int[][]...
-
Assume the same facts as in Problem I:9-53, except that Becky and Ken are not related and that under the terms of the loan Ken agrees to repay Becky the \($5,000\) plus interest (at a reasonable...
-
During 2022, Becky loans her brother Ken \($5,000,\) which he intends to use to establish a small business. Because Ken has no other assets and needs cash to establish the business, the agreement...
-
During 2023, Pam incurred the following casualty losses: All of the items were destroyed in the same casualty, which resulted from a federally declared disaster. Before considering the casualty...
Study smarter with the SolutionInn App