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.
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.
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
Trending now
This is a popular solution!
Step by step
Solved in 2 steps