In the Java file NameRearranged.java, write a Java program that reads in a full name and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In the Java file NameRearranged.java, write a Java program that reads in a full name and rearranges that name as shown below. The input name must be in the exact format as shown below (Firstname Initial Lastname). If it is not, your code need not work correctly. We will not enter invalid input like having 2 spaces instead of 1 or leaving or give two initials (even though many people have two or more middle names), or have other enhancements like Jr, II, 3rd, Firstname Initial Lastname Rearrange the input name into this format Lastname, Firstname I. Your dialog must look exactly like this when the user enters Mary J Blige. Enter a name in the form of 'First I Last': Mary J Blige Blige, Mary J. eu.jav Hints (use these hints, ignore them, use something else): Assume all inputs are in the correct format: FirstName, space, a one letter initial (no period), a space, and finally the last name Use Scanner's nextLine() method to return the entire line including spaces M M M M A "ABCD".indexOf("BC") returns 1 "ABCDEFG".substring(2, 5) returns "CDE" "ABC" + "DE" evaluates to "ABCDE" In the Java file NameRearranged.java, write a Java program that reads in a full name and rearranges that name as shown below. The input name must be in the exact format as shown below (Firstname Initial Lastname). If it is not, your code need not work correctly. We will not enter invalid input like having 2 spaces instead of 1 or leaving or give two initials (even though many people have two or more middle names), or have other enhancements like Jr, II, 3rd, Firstname Initial Lastname Rearrange the input name into this format Lastname, Firstname I. Your dialog must look exactly like this when the user enters Mary J Blige. Enter a name in the form of 'First I Last': Mary J Blige Blige, Mary J. eu.jav Hints (use these hints, ignore them, use something else): Assume all inputs are in the correct format: FirstName, space, a one letter initial (no period), a space, and finally the last name Use Scanner's nextLine() method to return the entire line including spaces M M M M A "ABCD".indexOf("BC") returns 1 "ABCDEFG".substring(2, 5) returns "CDE" "ABC" + "DE" evaluates to "ABCDE" In the Java file NameRearranged.java, write a Java program that reads in a full name and rearranges that name as shown below. The input name must be in the exact format as shown below (Firstname Initial Lastname). If it is not, your code need not work correctly. We will not enter invalid input like having 2 spaces instead of 1 or leaving or give two initials (even though many people have two or more middle names), or have other enhancements like Jr, II, 3rd, Firstname Initial Lastname Rearrange the input name into this format Lastname, Firstname I. Your dialog must look exactly like this when the user enters Mary J Blige. Enter a name in the form of 'First I Last': Mary J Blige Blige, Mary J. eu.jav Hints (use these hints, ignore them, use something else): Assume all inputs are in the correct format: FirstName, space, a one letter initial (no period), a space, and finally the last name Use Scanner's nextLine() method to return the entire line including spaces M M M M A "ABCD".indexOf("BC") returns 1 "ABCDEFG".substring(2, 5) returns "CDE" "ABC" + "DE" evaluates to "ABCDE" In the Java file NameRearranged.java, write a Java program that reads in a full name and rearranges that name as shown below. The input name must be in the exact format as shown below (Firstname Initial Lastname). If it is not, your code need not work correctly. We will not enter invalid input like having 2 spaces instead of 1 or leaving or give two initials (even though many people have two or more middle names), or have other enhancements like Jr, II, 3rd, Firstname Initial Lastname Rearrange the input name into this format Lastname, Firstname I. Your dialog must look exactly like this when the user enters Mary J Blige. Enter a name in the form of 'First I Last': Mary J Blige Blige, Mary J. eu.jav Hints (use these hints, ignore them, use something else): Assume all inputs are in the correct format: FirstName, space, a one letter initial (no period), a space, and finally the last name Use Scanner's nextLine() method to return the entire line including spaces M M M M A "ABCD".indexOf("BC") returns 1 "ABCDEFG".substring(2, 5) returns "CDE" "ABC" + "DE" evaluates to "ABCDE"
Expert Answer:
Answer rating: 100% (QA)
The question youve presented is a programming exercise requiring you to write a Java program that re... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Solve Var(a+btxt) =
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Where is the line in the sand the point where such behaviors are so destructive that you feel that the relationship needs to end?
-
Kahn Company paid $240,000 to purchase a machine on January 1, 2017. During 2019, a technological breakthrough resulted in the development of a new machine that costs $300,000. The old machine costs...
-
The measurements of Fig. 4.155 all reveal that the network is not functioning correctly. List as many reasons as you can for the measurements obtained. Fig. 4.155 920 V 20 V 20 V 4.7 k2 4.7 k2 4.7 k2...
-
Find a form for a voluntary dismissal in a California court.
-
Kehoe, Inc. owes $40,000 to Ritter Company. How much would Kehoe have to pay each year if the debt is retired through four equal payments (made at the end of the year), given an interest rate on the...
-
Some selected sales and cost data for Alcid Manufacturing Company are given below: Direct materials used P 100,000 Direct labor 150,000 Factory overhead (40% variable) 75,000 Selling and...
-
Ben Johnson is the manager of the jewelry department of a large chain of department stores. The department store has succeeded on the basis of customer service and quality of merchandise. As a...
-
If you buy a 5 year, 2% CD for $5,000. How much is it worth at maturity?
-
Assuming that all sales were on account, calculate the following risk ratios for 2024. (Use 365 days a year. Round yo to 1 decimal place.) Risk Ratios 1. Receivables turnover ratio times 2. Average...
-
Canadian star tennis player Bianca Andreescu defeated Serena Williams in the 2019 US Open tournament. During the match Bianca served an ace right up the middle of the court. The ball left her racket...
-
CBS will pay its first dividend of $8 in 8 years. The growth rate is expected to be 4%. Ks are 17%. What price should CBS sell for today
-
Find all the cofactors of matrix A = = [15 21]
-
Wilbert's, Inc. paid $90,000, in cash, for a piece of equipment three years ago. Last year, the company spent $10,000 to update the equipment with the latest technology. The company no longer uses...
-
Take the following simple open economy: C=360+ 0.3(Y-T) I = 250+ 0.2Y - 1000i G=450 T = 100 IM = 0.2Y (Imports in foreign currency) X = 0.2 Y* (Exports in domestic currency) i=i = 0.03 Real Exchange...
-
Copy and complete the statement. 3800 m ? km =
-
Larry Gaines, age 42, sells his personal residence on November 12, 2012, for $144,000. He lived in the house for 7 years. The expenses of the sale are $10,500, and he has made capital improvements of...
-
For each of the following situations, indicate whether the taxpayer(s) is (are) required to file a tax return for 2012. Explain your answer. a. Helen is a single taxpayer with interest income in 2012...
-
Olive Corporation was formed and began operations on January 1, 2012. The corporation's income statement for the year and the balance sheet at year-end are presented below. The corporation made...
-
Examine the process activities and transactions for the supply chain and production management process shown in Figure 12-3. a. Using the example transactions listed in the same figure, describe...
-
Testing for unrecorded liabilities involves vouching a sample of disbursements made after fiscal year end to determine whether the underlying liabilities for the disbursements were recorded at the...
-
In your audit of Faye Co., management gives you the following (partial) list of internal controls over accounts payable: - The check approving and preparation duties are performed by separate...
Study smarter with the SolutionInn App