Question: PY T HoN Programming Assignment 8 (50 points) Due date: March 7th, 2018 at 11:59 PM Overvievw This assignment provides practice with lists, classes, and

 PY T HoN Programming Assignment 8 (50 points) Due date: March
7th, 2018 at 11:59 PM Overvievw This assignment provides practice with lists,

PY T HoN Programming Assignment 8 (50 points) Due date: March 7th, 2018 at 11:59 PM Overvievw This assignment provides practice with lists, classes, and functions in Python. Mailbox Class [50 points First, create a class called Message to model an e-mail message. The Message class has a recipient, a sender, and a message text as its basic data. This class will support that data with the following instance methods: -A constructor that initializes all members according to the passed parameters A method append that adds a line of text to the message body A method toString that makes the message into one long string like this: "From: Harry Morgan inTo: Rudolf Reindeerin..." Once defined, we will use it to instantiate Message objects that can be used in our main program. Second, create a class called Mailbox to store e-mail messages using the Message class. The Mailbox class stores a collection o messages. Implement the following methods: A constructor that constructs a new empty mailbox (use a list) A method addMessage that adds a new message to the mailbox. .A method getMessage that gets a message from the mailbox . A method removeMessage that returns the message in the mailbox at the provided index def addMessage (self, message) def getMessage (self, index) def removeMessage (self, index) Next, write a program that creates three instances of the Message class initialized with sample data. Then, create an instance of the Mailbox class. Name the source code files "Message.py", "Mailbox.py", and "MailboxDemo.py" Sample run: From: Bob To: Santa For Christmas, I would like: Video games World peace From: Bob To: Tooth Fairy Merry Christmas to my best friend I am wishing you blessings and joy this Christmas From: Bob To: Johnson Happy Thanksgiving to you and your family

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!