Question: I need the answer in java, with an explanation for the code. DESCRIPTION Provide a class for authoring a simple letter in the constructor, supply

I need the answer in java, with an explanation for the code.
I need the answer in java, with an explanation for the code.
DESCRIPTION Provide a class for authoring a simple letter in the constructor,
supply the names of the sender and the Tecipient Letter(String from String

DESCRIPTION Provide a class for authoring a simple letter in the constructor, supply the names of the sender and the Tecipient Letter(String from String to) Supply a method public void addLine(string line) to 200 a line of text to the body of the letter Supply a method public String getTextil that returns the entire text of the enter the text hes the form Dear recipient name baine Tirste of the body second ne of the Dog 1851 in at the body Bankine Sincerely bank the sender name Also sua main metod that print this tenten Dear John om sy we must part I wan vue est Sincerely Mary Construct an object of the countie complete the following class in your solution This class models a simple letter public class Letter Constructs a letter with a given sender and recipient @baram trom the sender @param to the recipient puolio LetterString from String to Adds a line to the body of this letter public void adalneString line Get the text of this letter public Suring getTexel You need the class Letter t public Letter() { public void addLine(String Line) 15 16 12 18 public String getText() 24 public class Letter Printer 27 public static void main(String[] args) { Letter new Letterary" Jo 1.addLine("I am sorry we must part.); 1.addLine(I wish you all the best."); System.out.println(l.getText()); 22 33 25

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!