Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions 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
expand button
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
expand button
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
Check Mark
Step 1

The above question is solved in step 2 :-

 

Knowledge Booster
Background pattern image
Computer Science
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
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education