Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1: The RepeatMessage class Target: This Java program will repeatedly print a certain message until the user tells the program to stop. The message

Problem 1: The RepeatMessage class

Target:

This Java program will repeatedly print a certain message until the user tells the program to stop.

The message to be printed would look as follows:

image text in transcribed

Specifications:

You do not necessarily need another method in addition to the main method to finish this program.

main Method

a) The main method should first create a message as a string literal She sells seashells by the seashore.

b) The main method should also create a Scanner object to get the users input from the keyword.

c) The main method will first output the message once.

d) The main method will then ask the user whether wants to continue.

e) Based upon the users input to decide whether to continue printing the message again or stop.

A message will be printed once again if the user inputs either yes, YES, Yes, Y or y

The message will stop being printed out if the user inputs either NO, no, No, N or n.

Please use hasNext Methods for the Do you want to hear it again part

She sells seashells by the seashore. Do you want to hear it again? lves She sells seashells by the seashore Do you want to hear it again? She sells seashells by the seashore. Do you want to hear it again? YES She sells seashells by the seashore. Do you want to hear it again? No

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

=+ How does it compare to the economys GDP?

Answered: 1 week ago

Question

What is Taxonomy ?

Answered: 1 week ago

Question

1. In taxonomy which are the factors to be studied ?

Answered: 1 week ago

Question

1.what is the significance of Taxonomy ?

Answered: 1 week ago

Question

What are the advantages and disadvantages of leasing ?

Answered: 1 week ago