In this task, we're going to be creating an Email Simulator using OOP. Follow the instruction and fill in the rest of logic to fulfil the below program requirements. • Open the file called email.py. Create an Email class and initialise a constructor that takes in three arguments: o email_address - the email address of the sender (for Inbox emails) or recipient (for Outbox emails). o subject_line - the subject of the email. o email_contents - the content of the email. The email class should contain two instance-level class variables with default values: o has been read-initialised to False. o is_spam-initialised to False. • The Email class should also contain the following class methods to edit the values of the email objects: o mark_as_read which should change has been read to True. o mark_as_spam which should change is_spam to True. Initialise the following empty lists to store, and access, the email objects: (note that you can have a list of objects) o Inbox o Outbox Create the following functions to add functionality to your email simulator: o populate_inbox() - a function which creates an email object with the email address, subject line and contents, and stores it in the Inbox list. Take note: At program start-up, this function should be used to populate your Inbox with three sample emails for further use in your program. Note that this function does not need to be included as a menu option for the user.
In this task, we're going to be creating an Email Simulator using OOP. Follow the instruction and fill in the rest of logic to fulfil the below program requirements. • Open the file called email.py. Create an Email class and initialise a constructor that takes in three arguments: o email_address - the email address of the sender (for Inbox emails) or recipient (for Outbox emails). o subject_line - the subject of the email. o email_contents - the content of the email. The email class should contain two instance-level class variables with default values: o has been read-initialised to False. o is_spam-initialised to False. • The Email class should also contain the following class methods to edit the values of the email objects: o mark_as_read which should change has been read to True. o mark_as_spam which should change is_spam to True. Initialise the following empty lists to store, and access, the email objects: (note that you can have a list of objects) o Inbox o Outbox Create the following functions to add functionality to your email simulator: o populate_inbox() - a function which creates an email object with the email address, subject line and contents, and stores it in the Inbox list. Take note: At program start-up, this function should be used to populate your Inbox with three sample emails for further use in your program. Note that this function does not need to be included as a menu option for the user.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 11 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY