Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Help! Its in java file.php/155147/mod resource/content/7/Strings/Stringercise.pdf A+ Computer Science Stringercise Lab Value -100 Lab Goal: This program was designed to review previously used String

Please Help! Its in java

image text in transcribed

file.php/155147/mod resource/content/7/Strings/Stringercise.pdf A+ Computer Science Stringercise Lab Value -100 Lab Goal: This program was designed to review previously used String methods and introduce you to new ones. Lab Description: For the first part of this lab you can only use one String variable. You will modify the string as described below and print the result of each modification. You will need to refer to the String API for methods to accomplish certain steps Steps 1-5 store each change back in your variable. Create a String with your first name 2. Concatenate your Middle Name to the String using the + operator. 3. Concatenate your Last Name to the String using a method of the String class 4. Change your name to all lower case. 5. Change your name to all UPPER CASE. Steps 6-10 do not require you to store the result back in the string. Just print them out. 6. Print out the length of your String 7. Print out your first/middle/last names as substrings 8. Without using the substring method, print your initials. 9. Find the index of your middle name in your String. 10. Find the first character in your name and replace all instances of it with X's Steps 11-13 you will need to create three more variables of the primitive datatype int. Assign the values 5, 15, 21 to each variable, respectively 11. Change the three ints into Strings 12. Compare the numbers (in String form) to your age. 13. Change the Strings back to ints and add them together Sample Output 1. Harry 2. Harry the . Harry he Hawk 4. harry the hawk 5, HARRY THE HAWK 6, 14 7HARRY THE HAWK 8, HT 10. XARRY TXE XAWK 11. 5. 15. 21 12. 4.0. I te + Pho

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions