Provide a class for authoring a simple letter. In the constructor, supply the names of the sender

Question:

Provide a class for authoring a simple letter. In the constructor, supply the names of the sender and the recipient:

image text in transcribed

image text in transcribed

Construct an object of the Letter class and call addLine twice.
(1) Use the concat method to form a longer string from two shorter strings.

(2) The special string "" represents a new line. For example, the statement body = body.concat("Sincerely,").concat("");
adds a line containing the string "Sincerely," to the body.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Big Java, Enhanced Early Objects

ISBN: 9781119499091

7th Edition

Authors: Cay S Horstmann

Question Posted: