Question: Objective: To give you practice working with Strings Part A: The License Plates Company (LPC, LLC) is an online company that makes license plates. They

 Objective: To give you practice working with Strings Part A: The
License Plates Company (LPC, LLC) is an online company that makes license

Objective: To give you practice working with Strings Part A: The License Plates Company (LPC, LLC) is an online company that makes license plates. They generate the license plate numbers based on user input. Specifically, they ask the user to enter their first middle and last name, followed by their social security number. They then generate a license plate consisting of: The first letter of their first name The middle letter of their middle name The last letter of their last name The last 4 digits of their social security number. Sample Output # 1: Sample Output # 2: Name: Michael Philip Rogers SSN: 123-45-6789 Name: Rosa Louise Parks SSN: 123456789 License Plate: MLS 6789 License Plate: RIS 6789 Hints: You know how to read in three names (we discussed it in class). You also know how to get characters in any position in a word. But how will you get the last 4 digits of SSN, when sometimes the SSN is 9 characters long and sometimes 11? You actually know this, too. Just think about all the methods involving Strings that we studied, length(), charAt(), substringo. indexOfo. One method that we did not study -- toUpperCase() -- returns an uppercase version of a String. You will want to use that so that we can get CAPITAL LETTERS for the license plate. As with the other methods we have studied, toUpperCase() does not change the String. The only way you could change it would be to assign the uppercase version back into the String variable. String icon="Harriet": System.out.println( icon.toUpperCase()); icon icon.toUpperCase(); 1/ HARRIET is printed, but icon is still "Harriet" // now icon is "HARRIET" Instructions: 1. Add a Java class, License PlatesCompany, to a Bluej project, Lab4. 2. Customize the multiline comment at the top of Change, and the README. 3. Write an algorithm, just in English, describing step by step how you will solve this problem. List the steps in the README (the file that comes in the Blue project) 4. Follow the checklist at the end of this document Part B: Write a program that will read in one line of text, a sentence, as input, and then display the following: if the sentence ends in a ?, and has an even number of characters, print "Yes If the sentence ends in a ? and has an odd number of characters, print 'No' if the sentence ends in a I, print "Wow" In all other cases, write "You always say", followed by what they said, in Sample Output (4 different runs) Sentence: I dream of electric sheep You always say I dream of electric sheep Sentence: Am I right? No Sentence: Am Irright? Yes Sentence: Say hey! Wow Hints: This would probably work very well in an if-else-if-else-if-else statement. Since you need to use the last character of a sentence in 3 places, find it first, storing it in a variable, e.g., lastChar. That will make your if statement conditions shorter. Instructions: 1. Add a Java class, Sentencer, to the Lab4 2. Write the code as described above 3. Submit it in the usual way (after demoing it) Deliverables: To complete this lab, do four things: Complete the checklist below Demonstrate to either the Lab Assistant or the Instructor prior to lab or during office hours. Submit your entire Lab (zip the entire project) and upload it to Canvas Separately upload a screenshot (do not zip it as part of your project) showing the output, using the values specified in the sample output section Checklist (not to hand in): Auto-layout applied? (command-shift-1 or ctrl shift-1) Comment block filled in? (Name, Date. Description) README filled in (with the algorithm for part A) Descriptive identifier names chosen? (a, e, se, and st will get a 0 for sure) Redundant parentheses removed? -- 0.9., a = (bc) + (d'e): or worse'a = ((b*c) + (de); Both should be written a = b c + d'e; Spelling/spacing checked? Your output should match mine

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!