/mobilephone-answer-1.1

1. Create inheritance using MobilePhone as base class and Apple & Samsung as child class 1. The base class should have properties: 1. ScreenType = Touch Screen 2. NetworkType = 4G/5G 3. DualSim = True or False 4. FrontCamera = (5MP/8MP/12MP/16MP) 5. rearCamera = (8MP/12MP/16MP/32MP/48MP) 6. RAM = (2GB/3GB/4GB) 7. Storage = (16GB/32GB/64GB)

Primary LanguagePython

QUESTION ONE

  1. Create inheritance using MobilePhone as base class and Apple & Samsung as child class
  2. The base class should have properties:
  3. ScreenType = Touch Screen
  4. NetworkType = 4G/5G
  5. DualSim = True or False
  6. FrontCamera = (5MP/8MP/12MP/16MP)
  7. rearCamera = (8MP/12MP/16MP/32MP/48MP)
  8. RAM = (2GB/3GB/4GB)
  9. Storage = (16GB/32GB/64GB)
  10. Create basic mobile phone functionalities in the classes like: make_call, recieve_call, take_a_picture, etc.
  11. Use super() constructor for calling parent class’s constructor
  12. Make some objects of Apple class with different properties
  13. Make some objects of Samsung class with different properties [39 Marks] 3 | P a g e SECTION B QUESTION TWO What is the output of the following code: class BMW: def init(self, name, model, year): self.name = name self.model = model self.year = year def start(self): print("Starting the car ...") def stop(self): print("Stopping the car ...") def drive(self): pass class ThreeClass(BMW): def init(self, CuriseAssistEnabled, name, model, year): BMW.init(self, name, model, year) self.CuriseAssistEnabled = CuriseAssistEnabled def display(self): print(self.CuriseAssistEnabled) def drive(self): print("Three Class is being driven..") threeClass = ThreeClass(True, "BMW", "328i", 2018) print( threeClass.CuriseAssistEnabled, threeClass.name, threeClass.model, threeClass.year