Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a java program that prompts the user for first and last name (separately). Calculate and write out total number of letters in each name

Write a java program that prompts the user for first and last name (separately). Calculate and write out total number of letters in each name and write the name in the format last name, first name last name. Use an instance of the Random class to generate a random integer between 1 and the number of letters in the name.

Example

Enter your first name: James

Enter your last name: Bond

You have 9 letters in your name.

Bond, James Bond, your lucky number is 6.

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

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

Conduct a needs assessment. page 283

Answered: 1 week ago