Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a. Create a class named NameTester form Lab4. (You will not need a class. This will have the main method in it). b. Import Scanner

a. Create a class named NameTester form Lab4. (You will not need a class. This will have the main method in it).

b. Import Scanner

c. Create a Scanner object

d. Prompt for your first name.

e. Create a variable for your first and get the user input for your first name.

f. Prompt for your last name.

g. Create a variable for your last name and get the input for your last name.

h. Create a variable for a blank.

i. Create a variable for your full name and assign it your first and last name and a blank using the + operator.

j. Using the variable for your full name, use the substring method (use the table on page 159) as a guide) print out your name with one letter on each line. This should be accomplished using a loop. Remember you can get the length of the string from the method .length(). If you do not use a loop, you will not get credit.

S

T

E

V

E

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Samsung Galaxy S23 Ultra Comprehensive User Manual

Authors: Leo Scott

1st Edition

B0BVPBJK5Q, 979-8377286455

More Books

Students also viewed these Databases questions