oblem 1 [5 marks] All vowels (filename: AllVowels.java) Design an algorithm and then write a program...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
oblem 1 [5 marks] All vowels (filename: AllVowels.java) Design an algorithm and then write a program that randomly generates 4 vowels (a, e, i, o, u) all in lowercases. If any time the generated letter is not a vowel, the program re-generates a new letter. The vowels may be repeated. You must use the keyword break or continue in your loop. Problem 1 [5 marks] All vowels (filename: AllVowels.java) Design an algorithm and then write a program that randomly generates 4 vowels (a, e, i, o, u) all in lowercases. If any time the generated letter is not a vowel, the program re-generates a new letter. The vowels may be repeated. You must use the keyword break or continue in your loop. Problem 2 [30 marks] Displaying a calendar (filename: DisplayCalendar.java) Design an algorithm and then write a program that prompts the user to enter a year and the first day of the year, and displays the calendar for the year. For example, if the user enters year 2019, and 2 for Tuesday, January 1, 2019, your program should display the calendar for the 12 months in the year, as follows: Enter a year: 2019 Enter the first day of the year: 2 Sun Mon 6 13 20 27 N N H J 3 10 17 24 7 14 21 28 Sun Mon THHN 4 11 18 85 25 January 2019 Tue Wed Thu 3 10 17 1 8 15 22 29 2 6 N 5 12 19 26 9 16 23 30 February 24 31 Tue Wed Thu 6 13 20 27 2019 7 14 21 N N 28 Fri 4 N P PA 11 18 185 25 Fri 1 H HN 8 15 NG 22 Sat NTC is 5 12 296 19 26 SNOHN Sat 2 9 war 16 23 oblem 1 [5 marks] All vowels (filename: AllVowels.java) Design an algorithm and then write a program that randomly generates 4 vowels (a, e, i, o, u) all in lowercases. If any time the generated letter is not a vowel, the program re-generates a new letter. The vowels may be repeated. You must use the keyword break or continue in your loop. Problem 1 [5 marks] All vowels (filename: AllVowels.java) Design an algorithm and then write a program that randomly generates 4 vowels (a, e, i, o, u) all in lowercases. If any time the generated letter is not a vowel, the program re-generates a new letter. The vowels may be repeated. You must use the keyword break or continue in your loop. Problem 2 [30 marks] Displaying a calendar (filename: DisplayCalendar.java) Design an algorithm and then write a program that prompts the user to enter a year and the first day of the year, and displays the calendar for the year. For example, if the user enters year 2019, and 2 for Tuesday, January 1, 2019, your program should display the calendar for the 12 months in the year, as follows: Enter a year: 2019 Enter the first day of the year: 2 Sun Mon 6 13 20 27 N N H J 3 10 17 24 7 14 21 28 Sun Mon THHN 4 11 18 85 25 January 2019 Tue Wed Thu 3 10 17 1 8 15 22 29 2 6 N 5 12 19 26 9 16 23 30 February 24 31 Tue Wed Thu 6 13 20 27 2019 7 14 21 N N 28 Fri 4 N P PA 11 18 185 25 Fri 1 H HN 8 15 NG 22 Sat NTC is 5 12 296 19 26 SNOHN Sat 2 9 war 16 23
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
a. Example 13-1: Batch Reactor with an Exothermic Reaction Wolfram 1. Adiabatic Case: Use Wolfram to see whether you can find a trajectory that is ready to ignite and whose trajectory looks like a...
-
The Unilever Bangladesh Limited has a plant in Narayanganj, manufacturing Dove shampoo made from the ingredient imported from abroad. The company claims that each bottle of 200ml contain on average...
-
While fishing, you get bored and start to swing a sinker weight around in a circle below you on a 0.25-m piece of fishing line. The weight makes a complete circle every 0.75 s. What is the angle that...
-
For Exercises explain how each could be simulated by using random numbers. Two players toss two coins. If they match, player 1 wins; otherwise, player 2 wins.
-
If your instructor assigns a marketing plan for your class, we hope you will be excitedfor two reasons. First, you will get insights into trying to actually do marketing that often go beyond what you...
-
Lou Barlow, a divisional manager for Sage Company, has an opportunity to manufacture and sell one of two new products for a five-year period. His annual pay raises are determined by his divisions...
-
How can the relationship between Online Analytical Processing (OLAP) systems and Customer Relationship Management (CRM) bolster an organization's marketing efforts?
-
Raleigh Medical Clinic is considering acquiring 2 new ultrasound machines for $300,000. The clinic estimates that the machines will have an economic life of 4 years after which they will have zero...
-
A fund has a NAV of $30 per share but the shares are currently selling for $32. This fund must be a(n): O open-ended fund. closed-end fund. balanced fund. aggressive growth fund. money market mutual...
-
For the transfer function computed in (1), perform the following tasks Find the poles and zeros of the system G (s). a. b. Find the response of the system if VB = 120 u(t), where u(t) is the unit...
-
Reflect on resistance to change in different stakeholder groups, what strategies would you use to address the change with each group. Explain why these strategies are considered best practices?...
-
For two projects of equal risk and equal size, an IRR of 12% is better than an IRR or 11% (all other variables the same)
-
Identify a style rule that applies a thin (0.1em) solid black (#000000) border and 1em of padding to all sides of a table header and table data elements. th, td { border: 0.1em solid #000000;...
-
Find the domain and the range of the following functions 1. f(x)=3x+2 2. f(x)= x) = 11/ 1-x 3. f(x)=x+2
-
22. Which is an example of discriminate learning? * (1 Point) A dog learns to salivate at a bell A chick imprints on the first thing it sees A pigeon pecks on the red button to get food and ignores...
-
A bar of a steel alloy that exhibits the stress-strain behavior shown in Figure 6.22 is subjected to a tensile load; the specimen is 375 mm (14.8 in.) long and has a square cross section 5.5 mm (0.22...
-
a. Example 8-1: Trambouze Reactions Wolfram 1. Fix k 2 at 0.015 and then describe how the selectivity varies with k 1 and k 3 . 2. Write a conclusion about your experiments. Polymath 3. What would...
-
The production of ethylene glycol from ethylene chlorohydrin and sodium bicarbonate CH2OHCH2Cl + NaHCO3 (CH2OH)2 + NaCl + CO2 is carried out in a semibatch reactor. A 1.5-molar solution of ethylene...
-
How would you modify Table 6-2 for a. A constant-volume gas-phase reaction, and b. A variable-volume gas-phase reaction? Table 6-2 1. Mole balances: BR dNAdt=rAV dNBdt=rBV dNCdt=rCV dNDdt=rDV PFR PBR...
-
The latent heat of vaporization per unit mass of a pure substance at a given temperature, \(\lambda\), is defined as the difference in enthalpy between the saturated vapor and saturated liquid at the...
-
It is desired to dehumidify \(1.2 \mathrm{~m}^{3} / \mathrm{s}\) of air, available at \(311 \mathrm{~K}\) with a wet-bulb temperature of \(303 \mathrm{~K}\), to a wet-bulb temperature of \(288...
-
Modify the Mathcad program developed in Problem 3.16 to estimate the minimum gas flow rate in strippers so that it can be used to estimate the minimum air flow required for water cooling. Test your...
Study smarter with the SolutionInn App