Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribed image text in transcribed image text in transcribed

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. The letter has the 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 this Letter class will have the following output

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

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions

Question

2. How will the team select a leader?

Answered: 1 week ago