"Donald". Change middleName so it is initialized to "Richard". Change lastName so it is initialized to "Dirka". 7. When you run main this time you should see exactly the following: Name: Donald Richard Dirka Number of characters in full name: 18 Login id: dirkadr. . strings from the terminal like this: System.out.println("Enter String firstName = Given.getString(); An example of the final result looks like this: wy 2 BlueJ: Terminal Window-Lab2 Options Enter your first name: James Enter your middle name: Tiberius your first name: "); Enter your last name: Kirk Name: James Tiberius Kirk Number of characters in full name: 17 Login id: kirkjt ● H

New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter9: Getting Started With Javascript: Creating A Countdown Clock
Section: Chapter Questions
Problem 5RA
icon
Related questions
Question
100%
"Donald". • Change middleName so it is initialized to "Richard". Change lastName so it
is initialized to "Dirka". 7. When you run main this time you should see exactly the
following: Name: Donald Richard Dirka Number of characters in full name: 18 Login id:
dirkadr.
strings from the terminal like this:
System.out.println("Enter your first name: ");
String firstName = Given.getString();
An example of the final result looks like this:
DIVUH DYU VANEMAT
2 Bluel: Terminal Window - Lab2
Options
Enter your first name:
James
Enter your middle name:
Tiberius
Enter your last name:
Name: James Tiberius Kirk
Number of characters in full name: 17
Login id: kirkjt
RE
MITH
ਹੈ।
E
H
7
Transcribed Image Text:"Donald". • Change middleName so it is initialized to "Richard". Change lastName so it is initialized to "Dirka". 7. When you run main this time you should see exactly the following: Name: Donald Richard Dirka Number of characters in full name: 18 Login id: dirkadr. strings from the terminal like this: System.out.println("Enter your first name: "); String firstName = Given.getString(); An example of the final result looks like this: DIVUH DYU VANEMAT 2 Bluel: Terminal Window - Lab2 Options Enter your first name: James Enter your middle name: Tiberius Enter your last name: Name: James Tiberius Kirk Number of characters in full name: 17 Login id: kirkjt RE MITH ਹੈ। E H 7
ment
Insert Format Tools Extensions Help
%
Normal text
Arial
1
1
T
T
Click here to listen to this document
Last edit was 8 minutes ago
1
T
In blue j
D
Create the following variables in main: A variable named firstName, initialized to
"John". • A variable named middleName, initialized to "Clarence". A variable named
lastName, initialized to "Doe". 4. Below the variables you created in the previous step,
create the following variables whose values will use the values of the above variables: •
A variable named fullName that concatenates firstName, middleName, and lastName
(using the operator) with a single space between each of the parts of the full name..
A variable called characterCount that calculates the number of characters in a full
name, not counting spaces. Do this by first counting the characters in firstName, then
counting the characters in middleName, then counting the characters in lastName, and
then combining these counts appropriately. Do not just count the characters in fullName.
Remember that strings have a length method. • A variable called login that creates an
all lowercase login ID from a full name. To do this, extract the first character of firstName
and the first character of middleName, and concatenate them onto the end of lastName.
Remember that strings have charAt and to LowerCase methods. 5. Display the following
output using the the fullName, characterCount, and login variables. Use a single println
statement for each line of output. Name: John Clarence Doe Number of characters in
full name: 15 Login id: doejc 6. Complete the following tasks, changing only the values
of the variables you created above. If you used your variables properly, neither your
calls to println nor the lines where you computed values for fullname, characterCount,
and login should not need to be changed. Change firstName so it is initialized to
A
-
1
12
1 21₁
1
1
1
BIUA
B I U A
1 3
10
G-D
1
= 13 = = -
MI 5.
6
1
M
H
7
Transcribed Image Text:ment Insert Format Tools Extensions Help % Normal text Arial 1 1 T T Click here to listen to this document Last edit was 8 minutes ago 1 T In blue j D Create the following variables in main: A variable named firstName, initialized to "John". • A variable named middleName, initialized to "Clarence". A variable named lastName, initialized to "Doe". 4. Below the variables you created in the previous step, create the following variables whose values will use the values of the above variables: • A variable named fullName that concatenates firstName, middleName, and lastName (using the operator) with a single space between each of the parts of the full name.. A variable called characterCount that calculates the number of characters in a full name, not counting spaces. Do this by first counting the characters in firstName, then counting the characters in middleName, then counting the characters in lastName, and then combining these counts appropriately. Do not just count the characters in fullName. Remember that strings have a length method. • A variable called login that creates an all lowercase login ID from a full name. To do this, extract the first character of firstName and the first character of middleName, and concatenate them onto the end of lastName. Remember that strings have charAt and to LowerCase methods. 5. Display the following output using the the fullName, characterCount, and login variables. Use a single println statement for each line of output. Name: John Clarence Doe Number of characters in full name: 15 Login id: doejc 6. Complete the following tasks, changing only the values of the variables you created above. If you used your variables properly, neither your calls to println nor the lines where you computed values for fullname, characterCount, and login should not need to be changed. Change firstName so it is initialized to A - 1 12 1 21₁ 1 1 1 BIUA B I U A 1 3 10 G-D 1 = 13 = = - MI 5. 6 1 M H 7
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Study of Characters
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,