Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java... Customer First Name: Take the first and last character of the input and convert them to lower case. Customer Last Name: Take the

In java...
Customer First Name: Take the first and last character of the input and convert them to lower case.
Customer Last Name: Take the first two characters of the last name and convert them to upper case. Then concatenate the result of step 1 onto 2. Order of result should be Last Name then First Name in the format of "UUll".
Customer Age: Concatenate the result of 2 onto the first digit of the customers age. Then concatenate the binary value of the second digit of the customers age to the end. The binary representation should be 4 digits long. Example: 1 would be [0001] and 7 would be [0101]. Hint: There is a method provided in the Integer class that performs this operation. The result String at this point should be in the format #UUll####.
Customer Street Address: Remove all spaces, covert to upper, and then concatenate the result to the end of the result of 3. Hint: There is a String method that will be usefull here. The result String should now be #UUll####ADDRESSINPUT.
Customer City: Convert the city to upper case, take the first 2 characters then add a leading white space (an empty space ). Concatenate onto the result. The result String should now be #UUll####addressinput CI.
Customer State: Convert the state to upper case. Take the ASCII value of the first character and add it to the value of the second. Concatenate the value to the result. The result String should now be #UUll####addressinput CI### where the last ### is between 130(A+A) and 182(Z+Z).
Customer Zip Code: Add the first and third digits of zip code together. Concatenate the value onto the result. The result String should now be #UUll####addressinput CI#### where the last # is either 1 or 2 digits.
Customer Phone Number: Concatenate the last 4 digits of the phone number to the result. The result String should now be #UUll####addressinput CI########.
Take the total length of all prior inputs, including white spaces. Concatenate the result from step 9 to the length. The result String should now be ##UUll####addressinput CI######## where the first # is any number of digits greater than 1.
Remove all instances of capitol o's O or capitol i's I from the result. Hint: There is a method in the String class for replacing characters with other characters. The String format may change slightly.
Lastly, using System.out.println() print the following message: The Assigned User String is + theGenerateResult

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions