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
-
Ann would like to receive $ 4 0 , 0 0 0 , adjusted for inflation, at the beginning of each year for the next 3 0 years. She expects her investments to earn 7 % and inflation to average 3 % . What is...
-
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.
-
Assess Cracker Barrels issues with diversity from 10 years ago versus today. What did they do wrong and what have they done right?
-
Using the data in Exercise 8-5, assume that the allowance for doubtful accounts for Intimacy Mattress Company has a credit balance of $7,180 before adjustment on November 30. Journalize the adjusting...
-
What conditions may deserve special consideration when focusing on risk?
-
A firm sells its product in a perfectly competitive market where other firms charge a price of $80 per unit. The firm??s total costs are C(Q) = 40 + 8Q + 2Q2.a. How much output should the firm...
-
i want to have ananswer for the attached assignment ACC00724 (Accounting for Managers) S2, 2016 ASSIGNMENT 1 (20 MARKS) Question 1 Total marks for Q1. (10 marks) Financial statements of Nimbin Pty...
-
How much money should be deposited today in an account that earns 4.5% compounded monthly so that it will accumulate to $14,000 in 2 years? Click the icon to view some finance formulas. The amount of...
-
Cho, the counselor, is a 40-year-old Asian American male. He is deeply rooted in his cultural values and has recently opened a private practice in a diverse upscale neighborhood. He is not married...
-
Determine the stability of the sytem whose zero-pole plot is shown Stable Marginally stable Unstable 7 where all poles are of multiplicity 1.
-
Which choice has a greater present value if we assume a required rate of 10%. lump sum cash $248.69 $100 cash flows occurring one, two and three years from today single cash flow of $331 three years...
-
The price of convertible bond is equal or greater or lower than the straight bond price? If all are not, what it depends on?
-
In preparing a company's statement of cash flows using the indirect method, the following information is available: Net income Accounts payable decreased by Accounts receivable increased by...
-
Which XXX condition generates the following output? Not Found #include int BinarySearch(int numberList[], int element, int lowVal, int highVal) { int midVal; if (XXX) { midVal = (highVal + lowVal) /...
-
56. PERT charts and dantt charts can be used toanalysea. Financial feasibilityb. Technical feasibilityc. Schedule feasibilityd. Strategic feasibility57. The task of selecting the most feasible a 2...
-
Draw the major product for each of the following reactions: (a) (b) (c) 1) 9-BBN 2) H2O2, NaOH 1) Disiamylborane 2) H20, NaOH
-
Revise cash collections budget (Learning Objective 4) Turn to the original Whitewater Sporting Goods Data Set item 4. Suppose \(70 \%\) of sales are cash and \(30 \%\) are credit. Revise Whitewater's...
-
Revise inventory, purchases, and cost of goods sold budget (Learning Objective 4) Refer to the original Whitewater Sporting Goods Data Set item 5. Suppose cost of goods sold averages \(75 \%\) of...
-
Revise cash payments for purchases (Learning Objective 4) Refer to the original Whitewater Sporting Goods Data Set item 5. Suppose Whitewater Sporting Goods pays for \(60 \%\) of inventory purchases...
Study smarter with the SolutionInn App