subject

Provide a class Letter() for authoring a simple letter. In the constructor, supply the names of the sender and the recipient: def __init__(self, letterFrom, letterTo)Supply a method def addLine (self, line) to add a line of text to the body of the letter. Supply a method def getText(self)that returns the entire text of the letter. You also need to implement a test file to test your Letter(). The letter should have the following form: Dear recipient name: "blank line"first line of the body second line of the body last line of the body "blank line" Sincerely, "blank line" sender name For example, assuming that you have the sender named John and the recipient named Mary. John wrote two lines of the letter: 1: "How are you?" 2: I really miss you! Your test file leveraging Letter() will have the following output: Dear Mary: How are you? I really miss you! Sincerely, John

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:20, kathlynskare06
Ihave been given the number of guns per 100, and the total firearm-related deaths per 100,000. i have to find the actual number of guns per country and actual number of gun-related deaths. if somebody could show me how to do 1 question, i can finish the rest, i am just confused. tia
Answers: 3
image
Computers and Technology, 23.06.2019 00:30, vane3152
If joey was single and his taxable income was $9,500, how much would he pay in taxes each year?
Answers: 1
image
Computers and Technology, 23.06.2019 19:30, 123iamthe1
You can apply several different worksheet themes from which tab?
Answers: 1
image
Computers and Technology, 23.06.2019 21:30, shadoris26
To move a file or folder in microsoft windows, you can click and hold down the left mouse button while moving your mouse pointer to the location you want the file or folder to be, which is also known as.
Answers: 3
You know the right answer?
Provide a class Letter() for authoring a simple letter. In the constructor, supply the names of the...

Questions in other subjects:

Konu
Mathematics, 16.01.2020 21:31