New game
Download
Get Academic Plan
Share game
Integrate it into your platform

You can integrate the game into an LMS compatible with LTI 1.1 or LTI 1.3 such as Canvas, Moodle, or Blackboard. This way, the scores will be automatically saved into the platform’s gradebook.
Download
You have exceeded the maximum number of games you can integrate into Google Classroom with your current Plan.

To integrate as many games as you want in Google Classroom, you need an Academic Plan or a Commercial Plan.

You have exceeded the maximum number of games you can integrate into Microsoft Teams with your current Plan.

To integrate as many games as you want in Microsoft Teams, you need an Academic Plan or a Commercial Plan.

Downloading games is an exclusive feature for users with an Academic Plan or a Commercial Plan.

Get your Academic Plan or your Commercial Plan now and start integrating your games into your LMS, website or blog.

If you wish, you can download a demo game here and test its integration:

Fill in the Blanks: Polymorphism in Phones

Fill in the Blanks

Played 0

About this activity

Learn polymorphism with phone classes.

Created by

Argentina

Download the paper version to play

Make your own free game from our game creator
Compete against your friends to see who gets the best score in this game

Top Games

%
Anonymous
Anonymous
%
%
%
You have exceeded the maximum number of games you can print with your current Plan.

To print as many games as you want, you need an Academic Plan or a Commercial Plan.

Print your game
Fill in the Blanks: Polymorphism in Phones
 

Fill in the Blanks

Fill in the Blanks: Polymorphism in PhonesOnline version

Learn polymorphism with phone classes.

by JAZMIN PAZ
1

class CellPhone :
def __init__ ( , brand , model , price ) :
self . brand = brand
self . model =
. price = price

showInfo ( self ) :
print ( f " { self . brand } { self . model } - $ { self . price } " )

class SmartPhone ( ) :
def __init__ ( , brand , model , , os ) :
super ( ) . ( brand , model , price )
. os = os

def ( self ) :
print ( f " { self . brand } { self . model } ( OS : { self . } ) - $ { self . price } " )

class GamingPhone ( ) :
__init__ ( self , brand , model , price , gpu ) :
super ( ) . __init__ ( brand , model , )
self . gpu =

def showInfo ( ) :
print ( " { self . brand } { self . } ( GPU : { self . } ) - $ { self . price } " )


# Polymorphism in action
phones = [
SmartPhone ( " " , " 15 " , 1300 , " iOS " ) ,
GamingPhone ( " " , " Phone 8 " , 1500 , " Adreno 750 " )
]

phone in phones :
phone . ( )

2

In object - oriented programming , allows us to create new classes based on existing ones . For example , we can have a base class CellPhone that represents features of a phone . Then , like SmartPhone and OldPhone can from it . They keep the basic of a phone but can also add or features .

This leads to , which means that the same method can behave differently depending on the object . In our case , both SmartPhone and OldPhone have a call ( ) , but each one executes it in its own way ? one with a touchscreen , the other with physical buttons . This how inheritance and polymorphism make code more flexible and .

Are you sure you want to leave the page?

If you leave the page, you will lose your game progress.