This programming project should be completed and submitted by the beginning of Week 7, and is...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
This programming project should be completed and submitted by the beginning of Week 7, and is worth 4% of your final grade. Please refer to the "Assignment Instructions" for details on the marking rubric and submission instructions. 1. Write an application that prompts for and reads the user's first and last name (separately), then displays a string composed of the first four characters of the user's last name, followed by the first two letters of the user's first name, followed by a random number in the range of 10 to 99. Assume that the last name is at least four letters long. Similar algorithms are sometimes used to generate usernames for new computer accounts. Testing: If the inputs were "Michael" and "Jackson," the output should look like "JackMi42." Include several tests with different inputs, including your own name. 2. Write an application that reads the (x,y) coordinates for two points. This should prompt for and read each of the four values individually. Compute the distance between the two points using the following formula: Distance (x-x1)+(32-31) Testing: Include test exhibits for the following inputs: (1, 2) and (1, 2) are distance 0 (4,0) and (2, 0) are distance 2 (0, 0) and (3, 4) are distance 5 (0,0) and (1, 1) are distance 1.414... (i.e., the square root of 2) 3. Write an application that reads the radius of a sphere then calculates and displays the circumference, volume and surface area. Use the following formulas, in which r represents the sphere's radius. Print the output to four decimal places. Circumference = 2r Volume = = 4/3 3 Surface Area 42 This programming project should be completed and submitted by the beginning of Week 7, and is worth 4% of your final grade. Please refer to the "Assignment Instructions" for details on the marking rubric and submission instructions. 1. Write an application that prompts for and reads the user's first and last name (separately), then displays a string composed of the first four characters of the user's last name, followed by the first two letters of the user's first name, followed by a random number in the range of 10 to 99. Assume that the last name is at least four letters long. Similar algorithms are sometimes used to generate usernames for new computer accounts. Testing: If the inputs were "Michael" and "Jackson," the output should look like "JackMi42." Include several tests with different inputs, including your own name. 2. Write an application that reads the (x,y) coordinates for two points. This should prompt for and read each of the four values individually. Compute the distance between the two points using the following formula: Distance (x-x1)+(32-31) Testing: Include test exhibits for the following inputs: (1, 2) and (1, 2) are distance 0 (4,0) and (2, 0) are distance 2 (0, 0) and (3, 4) are distance 5 (0,0) and (1, 1) are distance 1.414... (i.e., the square root of 2) 3. Write an application that reads the radius of a sphere then calculates and displays the circumference, volume and surface area. Use the following formulas, in which r represents the sphere's radius. Print the output to four decimal places. Circumference = 2r Volume = = 4/3 3 Surface Area 42
Expert Answer:
Answer rating: 100% (QA)
Heres a Java program that addresses the three tasks mentioned import javautilScanner import javautil... View the full answer
Related Book For
Operations Management Managing Global Supply Chains
ISBN: 978-1506302935
1st edition
Authors: Ray R. Venkataraman, Jeffrey K. Pinto
Posted Date:
Students also viewed these programming questions
-
Units produced and sold Total revenues and costs Sales revenue Direct materials costs Direct labor costs Variable manufacturing overhead Fixed manufacturing overhead Variable marketing and...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Describe the typical terrorist cell.
-
Why is it important for Cracker Barrel to embrace diversity? What impact can an indifference to diversity have on customers and employees?
-
Best is considering using a basic exponential smoothing model with =0.2 to forecast capacity. Correction to the text: Use the capacity table from problem 3. a. Use the sales average of 480 through...
-
What procedures are required when inventories stored in a public warehouse are material?
-
Daniel Grady is the financial advisor for a number of professional athletes. An analysis of the long-term goals for many of these athletes has resulted in a recommendation to purchase stocks with...
-
Mario, who is single and elects to itemize, rents his mountain house for 2 1 0 days and uses it for personal use for 2 5 days during the year, not a leap year. Income and expenses associated with the...
-
Aristotle propounded three elements of persuasion. But some scholars have also observed that persuasion is Communication;and that the latter is also selling. From Aristotle's point of view on...
-
P(x > 170) The random variable x is normally distributed with mean = 174 and standard deviation = 20. Find the indicated probability.
-
A system consists of 7 identical components connected in parallel. Determine the reliability of each component if the overall reliability of the system is to be 0.90 ?
-
P(x < 160) The random variable x is normally distributed with mean = 174 and standard deviation = 20. Find the indicated probability.
-
During a trial on single cylinder four stroke IC engine, the following observations were taken : Mean effective pressure \(=4\) bar, speed \(=200\) RPM, Brake power \(=7.5 \mathrm{~kW}, \mathrm{~L} /...
-
An ideal gas, with \(C_{p}=7 \mathrm{cal} / \mathrm{mol}-{ }^{\circ} \mathrm{C}\), is compressed from 1 to \(50 \mathrm{~atm}\) while its temperature rises from 25 to \(150^{\circ} \mathrm{C}\). How...
-
1. How powerful is Watson? Describe its technology. Why does it require so much powerful hardware? 2. How intelligent is Watson? What can it do? What cant it do?
-
What do you think?
-
A plane gate of uniform thickness holds back a depth of water as shown. Find the minimum weight needed to keep the gate closed. 0=30 L=3m Water w=2m P3.45
-
Obtain an expression for the kinetic energy flux, \(\int\left(V^{2} / 2 ight)\) \(ho \vec{V} \cdot d \vec{A}\), through cross section (1) of the control volume shown. x CV Width = w P4.12 h V
-
The velocity distribution for laminar flow in a long circular tube of radius \(R\) is given by the one-dimensional expression, \[\vec{V}=u \hat{i}=u_{\max }\left[1-\left(\frac{r}{R} ight)^{2} ight]...
Study smarter with the SolutionInn App