Question: Select the Classes Select the most important two classes of our project. These can be the classes selected last week, or you might want to

Select the Classes

Select the most important two classes of our project. These can be the classes selected last week, or you might want to make adjustments based on feedback you received from your submission.

Write the Tests

With classes selected, it is time to write the unit tests. Each unit test should have four parts: Setup, Exercise, Verify, and Teardown. Additionally, each unit test should be encapsulated in a test class.

Strive to make every unit test fulfill the requirements in Chapter 25 of the textbook, and all the test cases meet the requirements of Chapter 14 of the textbook.

Run the Tests

The final step for this assignment is to run the tests. Initially, we expect the tests to fail. It probably will not even compile! Our job here is to write stub code for the classes under tests so they do compile but fail the test.

Here is my code so far. It doesn't need fixing yet, just unit tests designed

chess.cpp:

Select the Classes Select the most important two classes of our project.

These can be the classes selected last week, or you might want

to make adjustments based on feedback you received from your submission. Write

the Tests With classes selected, it is time to write the unit

tests. Each unit test should have four parts: Setup, Exercise, Verify, and

Teardown. Additionally, each unit test should be encapsulated in a test class.

Strive to make every unit test fulfill the requirements in Chapter 25

of the textbook, and all the test cases meet the requirements of

Chapter 14 of the textbook. Run the Tests The final step for

point.h:

this assignment is to run the tests. Initially, we expect the tests

uidraw.cpp:

to fail. It probably will not even compile! Our job here is

to write stub code for the classes under tests so they do

compile but fail the test. Here is my code so far. It

doesn't need fixing yet, just unit tests designed chess.cpp: point.h: uidraw.cpp: uiDraw.h

uiInteract.cpp: uiInteract.h: Thanks in advance! void ogstream:: drawSelected(int pos) \{ // do

nothing if there is nothing to do if ( pos 0 \&

uiDraw.h

\& pos =64 ) return; // find the row and column int

uiInteract.cpp:

row = pos /8; int col= pos %8; // set the color

and drawing style glBegin(GL_QUADS); glColor(RGB_SELECTED); // draw the square glVertex2i((GLint) ((col+0)32+3), (GLint)

(( row +0)32+3)); glVertex2i((GLint) ((col+1)323), (GLint) (( row +0)32+3)); glvertex2i((GLint) ((col+1)323), (GLint)

(( row +1)323)); glVertex2i((GLint) ((col+0)32+3), (GLint) (( row +1)323)); // indicate we

uiInteract.h:

are finished glend (); \} void ogstream:: drawHover(int pos) \{ // do

nothing if there is nothing to do if ( pos 0 pos

Thanks in advance!

void ogstream:: drawSelected(int pos) \{ // do nothing if there is nothing to do if ( pos 0 \& \& pos =64 ) return; // find the row and column int row = pos /8; int col= pos %8; // set the color and drawing style glBegin(GL_QUADS); glColor(RGB_SELECTED); // draw the square glVertex2i((GLint) ((col+0)32+3), (GLint) (( row +0)32+3)); glVertex2i((GLint) ((col+1)323), (GLint) (( row +0)32+3)); glvertex2i((GLint) ((col+1)323), (GLint) (( row +1)323)); glVertex2i((GLint) ((col+0)32+3), (GLint) (( row +1)323)); // indicate we are finished glend (); \} void ogstream:: drawHover(int pos) \{ // do nothing if there is nothing to do if ( pos 0 pos =64 ) return; // find the row and column int row = pos /8; int col= pos %8; // set the color and drawing style glBegin (GL_QUADS); glColor(RGB_SELECTED); // draw the square glvertex2i((GLint) ((col+0)32), (GLint) (( row +0)32)); glVertex2i((GLint) ((col+1)32), /,1 \#pragma once using std: :string; \#endif'// LINUX, XCODE return; void clickCallback(int button, int state, int x, int y ) \{ // determine what to do if the button is selected if (button == GLUT_LEFT_BUTTON \& \& state == GLUT_DOWN) \{ // Even though this is a local variable, all the members are static // so we are actually getting the same version as in the constructor. Interface ui; // get coordinates from screen dimensions int pos = ui.positionFromXY (x,y); // if the current cell is selected, then deselect it if (ui.getselectPosition() == pos) ui.clearselectPosition(); else ui.setSelectPosition (pos); \} 3 void moveCallback(int x, int y ) \{ // Even though this is a local variable, all the members are static // so we are actually getting the same version as in the constructor. Interface ui; // get coordinates from screen dimensions int pos = ui.positionFromXY (x,y); ui. sethoverPosition (pos); \} / void closeCallback() \{ exit(0); \} extition \#pragma once

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!