Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This programming project should be completed and submitted by the beginning of Week 7, and is worth 4% of your final grade. Please refer
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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Heres a Java program that addresses the three tasks mentioned import javautilScanner import javautil...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started