New game
Download
Get Academic Plan
Share game
Fill in the Blanks
Fill in the Blanks

Programming Practice

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:

Programming Practice

Fill in the Blanks

(2)
Played 11

About this activity

Practice for C++

Created by

United States

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
Programming Practice
 

Fill in the Blanks

Programming PracticeOnline version

Practice for C++

by Liz Smith
1

initX cout p2 x namespace newY Move p2 initY void newX p1 Print y endl Move Print Point 0 int newY y int

/ *
Purpose : declare a Point class type with inline member function to model a 2D point
* /

#include iostream / / for streaming i / o
using std ; / / reserve library for standard use

/ / declare the Point class to model a 2D point
class Point
{
public :
( ) { = ; y = 0 ; } / / the default constructor
Point ( int initX , int initY ) { x = ; = ; } / / the explicit contructor
void Print ( ) const { cout << " ( " << x << " , " << y << " ) " ; } / / to print a point
( , ) { x = newX ; = ; } / / to move a point
private :
int x ; / / the x coordinate
int y ; / / the y coordinate
} ;

int main ( )
{
Point p1 , / / declare a point at ( 0 , 0 )
p2 ( 1 , 2 ) ; / / declare a point at ( 1 , 2 )

/ / display p1 and p2

cout << " p1 = " ;
p1 . Print ( ) ;
cout << endl ;

/ / move p1 to ( 3 , 6 )
. ( 3 , 6 ) ;

/ / assign p1 to p2

p2 = p1 ;

<< " p2 = " ;
. ( ) ;
cout << ;

cout << " p2 = " ;
. ( ) ;
cout << endl ;

/ / successfully done
return 0 ;
}