Create a Java program which includes the following: ?Uses a random value as well as manipulates string and character objects in order to make an SS# (xxx-xx-xxxx). First 3 Numbers:Create a three digit...




  1. Create a Java program which includes the following:




?Uses a random value as well as manipulates string and character objects in order to make an SS# (xxx-xx-xxxx).




  1. First 3 Numbers:Create a three digit random integer named FirstThree in the range of 100- 999. (10 Points)




  2. Second 2 Numbers:Create a two digit number named SecondTwo by using FirstThree as follows: (10 Points)


    ?IfFirstThreeis 550 or less then create a 2 digit string using the name StringFirstThree from the first 2 digits ofFirstThreeotherwise create a 2 digit string named StringFirstThree using the last 2 digits ofFirstThree.




  3. Last 4 Numbers:Use the user’s name to generate a four place number string as follows: (10 Points)




    • ? Ask the user to enter their first name. Change their input to uppercase and find the length named FirstNameLength. If the length is less than 10 then add a 0 in front of the number and call it FirstLastTwo.




    • ? Ask the user for their last name. Change their input to uppercase and find the length named LastNameLength. If the length is less than 10, then add a 0 after the number and call it SecondLastTwo.




    • ? Combine FirstLastTwo and SecondLastTwo into a string named LastFour.






  4. SSN:Create a string named YourSSN that combines StringFirstThree, SecondTwo and


    LastFour with dashes where the output is like this 123-45-9884. (10 Points)




  5. Output:Tell the user their new SS number. (10 Points)



Nov 22, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here