PLEASE HELP ME, SOLVE THIS IN PYTHON PROGRAMMING: Instructions: Create class Inbox Problem Scenario Create a class definition SMS (Short Messaging System) which has the following method specifications:    Constructor:  __nit()__() - set the capacity of the inbox to 10. __init__(capacity) - set the capacity of the inbox by the user. (Parameterized constructor). Observers:  isFull() - Determine if inbox is FULL. isEmpty() - Determine if inbox is EMPTY. getLoadBalance () - Display remaining load balance. totalSMS() - Display the total current SMS of the inbox. getCapacity() - display capacity of the inbox. Transformers:  setSMS(String sms) - Send SMS to Inbox. 1 peso per message. Cannot send SMS when load balance is 0. Does not allow sending SMS to inbox if capacity it reaches to it maximum capacity. viewSMS() - View messages of inbox if inbox is not empty. deleteSMS (int index) - Delete/Remove SMS by index if inbox is not empty.(Cascade). deleteSMS (String value) - Delete/Remove SMS by index if inbox is not empty.(Cascade). searchSMS (int index) - Search SMS by index if inbox is not empty.(Cascade) clear() - Remove all the SMS from the Inbox if inbox is not empty. setLoad(int amount) - Add load amount to load wallet. setCapacity(int capacity) - set the capacity of the inbox.   Requirements: Use the OOP concepts to solve the problem scenario. Use the list to add, view, and clear sms.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

PLEASE HELP ME, SOLVE THIS IN PYTHON PROGRAMMING:

Instructions:

  1. Create class Inbox
  2. Problem Scenario

Create a class definition SMS (Short Messaging System) which has the following method specifications: 

 

Constructor: 

  • __nit()__() - set the capacity of the inbox to 10.
  • __init__(capacity) - set the capacity of the inbox by the user. (Parameterized constructor).

Observers: 

  • isFull() - Determine if inbox is FULL.
  • isEmpty() - Determine if inbox is EMPTY.
  • getLoadBalance () - Display remaining load balance.
  • totalSMS() - Display the total current SMS of the inbox.
  • getCapacity() - display capacity of the inbox.

Transformers: 

  • setSMS(String sms) - Send SMS to Inbox. 1 peso per message. Cannot send SMS when load balance is 0. Does not allow sending SMS to inbox if capacity it reaches to it maximum capacity.
  • viewSMS() - View messages of inbox if inbox is not empty.
  • deleteSMS (int index) - Delete/Remove SMS by index if inbox is not empty.(Cascade).
  • deleteSMS (String value) - Delete/Remove SMS by index if inbox is not empty.(Cascade).
  • searchSMS (int index) - Search SMS by index if inbox is not empty.(Cascade)
  • clear() - Remove all the SMS from the Inbox if inbox is not empty.
  • setLoad(int amount) - Add load amount to load wallet.
  • setCapacity(int capacity) - set the capacity of the inbox.

 

Requirements:

  1. Use the OOP concepts to solve the problem scenario.
  2. Use the list to add, view, and clear sms.

 

Sample Output 

 

Enter inbox capacity : 2

 

Inbox capacity [Full: False       Empty: True]

Total SMS: 0

 

[a]add

[v]iew

[l]oad

[c]lear

Option    : a

Message : How are you?

 

[a]add

[v]iew

[l]oad

[c]lear

Option    : v

 

Inbox capacity [Full: False       Empty: False]

Total SMS: 1

 

[a]add

[v]iew

[l]oad

[c]lear

Option    : a

Message : Are you hungry?

 

Inbox capacity [Full: True        Empty: False]

Total SMS: 2

 

[a]add

[v]iew

[l]oad

[c]lear

Option    : l

Enter load to add:       3

Load: 3

 

Inbox capacity [Full: False       Empty: False]

Total SMS: 2

 

[a]add

[v]iew

[l]oad

[c]lear

Option    : c

 

Inbox capacity [Full: False       Empty: True]

Total SMS: 0

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education