Write program

Write program (code) for the following scenario: (10 Marks)

From 1925 through 1963, Burma Shave advertising signs appeared next to highways all

across the United States. There were always four or five signs in a row containing pieces of a

rhyme, followed by a final sign that read “Burma Shave.” For example, one set of signs that

has been preserved by the Smithsonian Institution reads as follows:

Shaving brushes

You’ll soon see ’em

On a shelf

In some museum

Burma Shave

Find a classic Burma Shave rhyme on the Web. Write, compile, and test a class that produces

a series of four dialog boxes so that each display one line of a Burma Shave slogan in turn.

Save the class as BurmaShave.java and submit via Moodle.

3.

Write program (code) for the following scenario: (10 Marks)

Create a class named FormLetterWriter that includes two overloaded methods named

displaySalutation(). The first method takes one String parameter that represents a

customer’s last name, and it displays the salutation Dear Mr. or Ms. followed by the last

name. The second method accepts two String parameters that represent a first and last

name, and it displays the greeting Dear followed by the first name, a space, and the last

name. After each salutation, display the rest of a short business letter: Thank you for your

recent order. Write a main () method that tests each overloaded method. Save the file as

FormLetterWriter.java. and submit via Moodle.

4. Debugging (10 Marks)

Get the downloadable “Assessment 2 Files for Students.zip” which has syntax and/or logic errors.

In each case, determine the problem and fix the errors. After you correct the errors, save each file

using the same filename preceded with Fix. For example, DebugOne1.java will become

FixDebugOne1.java.