Question: B . With a static variable it counts how many objects have been created and then decrements when an object is destroyed. void Rect::fGlide (

B. With a static variable it counts how many objects have been created and then decrements
when an object is destroyed.
void Rect::fGlide(){
if (this->xInit ==0&& this->yInit ==0
int randomNum = this->randomNumber();
if (randomNum ==1)
this->moveDown();
else if (randomNum ==2)
this->moveRight();
else if (randomNum ==3)
this->moveDiagonalNegRight();
}??? randomly selects the direction of the object when it's at the coordinate (0,0)
if (this->xInit =600&& yInit =500
int randomNum = this->randomNumber();
if (randomNum ==1)
this->moveUp();
else if (randomNum ==2) else if (randomNum ==3)}//randomly selects the direction of the object when it's at the coordinate (600,500)
if (this->xInit ==600 && yInit ==0){ if (randomNum ==1) else if (randomNum ==2) else if (randomNum ==3)}//randomly selects the direction of the object when it's at the coordinate (600,0)
if (this->xInit ==0 && yInit ==500){if (randomNum ==1) else if (randomNum ==2) else if (randomNum ==3)}//randomly selects the direction of the object when it's at the coordinate (600,0)C. In main, Rect class objects were changed to heap pointers with the new and delete
commands. Two pointers are created to have two objects to be painted on the console..//Hace que la pantalla mida 600x500Rect *rectangle 1= new Rect;Rect::printObjectAmount(); (rectangle1)->fGlide();}delete rectangle2;system("pause"); return 0 ;
}//end main
D. Flowchart / draw a flow chart.
 B. With a static variable it counts how many objects have

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!