subject

Let's imagine that my_cell is an instance of class Apple_phone, your_cell is an instance of Android_phone and both Apple_phone and Android_phone inherit from a parent class Mobile_phone. Each one of the classes has a method Get_type() - an accessor that returns the type of the phone it is. Please write a program that creates my_cell, your_cell and calls Get_type() method on each. You should then print out "I am an apple" and "I am an android" in your main program. As you can probably guess, your classes have an attribute __type to keep track of the phone type.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Drag the tiles to the correct boxes to complete the pairs. match the errors with their definitions. #name #value #ref when a formula produces output that is too lengthy to fit in the spreadsheet cell arrowright when you enter an invalid cell reference in a formula arrowright when you type text in cells that accept numeric data arrowright when you type in a cell reference that doesn’t exist arrowright reset next
Answers: 1
question
Computers and Technology, 24.06.2019 22:00
Ican’t open these when it’s just a comment. someone pls explain why this is happening
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
When can you access the bios setup utility?
Answers: 1
You know the right answer?
Let's imagine that my_cell is an instance of class Apple_phone, your_cell is an instance of Android_...
Questions
question
Computers and Technology, 13.01.2021 18:30
question
Biology, 13.01.2021 18:30
question
Mathematics, 13.01.2021 18:30