Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

class Mobile: countryCodes = {880: Bangladesh, 966: India, 455: USA} def __init__(self, model, simCardStatus): self.model = model self.__simCardStatus = simCardStatus print(fModel {model} is manufactured.) def

class Mobile: countryCodes = {"880": "Bangladesh", "966": "India", "455": "USA"} def __init__(self, model, simCardStatus): self.model = model self.__simCardStatus = simCardStatus print(f"Model {model} is manufactured.") def setSimCardStatus(self,status): self.__simCardStatus = status print("SIM card status updated successfully.") def getSimCardStatus(self): return self.__simCardStatus def __str__(self): return f"Mobile Phone Detail: Model: {self.model} SIM Card Status: {self.__simCardStatus}" #Write your code here N3110 = Nokia("N3110", False) print("#######################################") print(N3110) print("1======================================") N1100 = Nokia("N1100", True,100) print("#######################################") print(N1100) print("2======================================") print(N3110.dialCall("88017196xxxx")) print("3======================================") N3110.changeSIMCardStatus() print("4======================================") print(N3110.dialCall("88017196xxxx")) print("5======================================") N3110.rechargeSIMCard(200) print("6======================================") print(N3110.dialCall("88017196xxxx")) print("7======================================") print(N1100.dialCall("45617196xxxx")) print("8======================================") print(N1100.dialCall("45517196xxxx")) print(N1100.dialCall("96617196xxxx")) print("9======================================") print(f"Dial call history for {N1100.model}: {N1100.dialCallHistory}") print(f"Dial call history for {N3110.model}: {N3110.dialCallHistory}") Output: Model N3110 is manufactured. ################################### Mobile Phone Detail: Model: N3110 SIM Card Status: False Balance:0 TK 1================================= Model N1100 is manufactured. ################################### Mobile Phone Detail: Model: N1100 SIM Card Status: True Balance:100 TK 2================================= No SIM card available! 3================================= SIM card status updated successfully. 4================================= Insufficient balance! 5================================= Recharge successful! Current balance 200 TK. 6================================= Dialing the number 88017196xxxx to Bangladesh region. 7================================= Dialing is not allowed in this region. 8================================= Dialing the number 45517196xxxx to USA region. Dialing the number 96617196xxxx to India region. 9================================= Dial call history for N1100: ['45517196xxxx', '96617196xxxx'] Dial call history for N3110: ['88017196xxxx'] Page 3 of 3 Set-B Question 3: CO4 [10 Points] 1 class A: 2 temp = 5 3 def __init__(self): 4 self.y = A.temp - 2 5 self.sum = self.temp + 1 6 A.temp += 3 7 def methodA(self, m, n, x=0): 8 self.y = self.y + m

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

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions

Question

Continuation of Exercise 5-5 Determine E(X), E(Y), V(X), and V (Y).

Answered: 1 week ago

Question

denigration of emotional outbursts; being reserved;

Answered: 1 week ago