Java Lesson 3 - Simple String Operations
Videos |
|
Text |
|
READ text then COMPLETE assignments below.
Your browser does not support viewing this document. Click here to download the document.
Assignments
|
|
Exercises on Lesson 3
Download and complete exercises for Lesson 3. Save and upload file here.
bp_ex_3.docx | |
File Size: | 20 kb |
File Type: | docx |
Project -Name that Celebrity
Create a new project called NameThatCelebrity in which only partially recognizable names of
celebrities are to be produced. In a real implementation of this game, the idea is for a contestant
to be able to guess the real name of the celebrity after the first two and last three letters are
dropped from the name. We have been given the task of testing the feasibility of this idea by
producing the following printout:
celebrities are to be produced. In a real implementation of this game, the idea is for a contestant
to be able to guess the real name of the celebrity after the first two and last three letters are
dropped from the name. We have been given the task of testing the feasibility of this idea by
producing the following printout:
Allan Alda>>>lan A
John Wayne>>>hn Wa
Gregory Peck>>>egory P
Begin your code within the main method as follows:
String s1 = "Allan Alda";
String s2 = "John Wayne";
String s3 = "Gregory Peck";
Apply the length and substring methods to these Strings to produce the above printout.