Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In JAUA umL 1 // board.h 2 #ifndef BOARD H // include guard 3 #define BOARD_H 4 5 class Board { 6 private: static const

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

In JAUA umL 1 // board.h 2 #ifndef BOARD H // include guard 3 #define BOARD_H 4 5 class Board { 6 private: static const int SIZE- 8; static const char WHITE = static const char BLACK - char slot[SIZE][SIZE]; 7. 8. 9. 10 11 public: 12 13 Board(); void line(); void display(); bool validate(int x1, int y1); void setslot (int x, int y, char c); 17}; 18#endif 14 15 16 steelseries (Intel nvIDE CORE IS th Gen GEFO GTX SORCE Lapto UML in yAva 1// piece.cpp 2#include "piece.h" 4Piece::Piece (int x, int y, Board *b) { this->x = x; this->y = y; b; %3D this->b = 8} Sorios irvioIA agonce Loptop BRAND UML in 1 // pawn.h 2 #ifndef PAWN_H // include guard 3 #define PAWN_H 4 #include "piece.h" 6 class Pawn : public Piece { 7 public: Pawn (int x, int y, Board *b): Piece(x, y, b) ( } void insert(); 10}; 11#endif uML inyan I // pawn.cpp 2 #include "pawn.h" 3. 4 void Pawn::insert() { if (b->validate(x,y)) { if (y != ) b->setSlot(x, y, 'P'); else 8. // future section for Queen 10 11 char move; 12 if ((y+1 != 1)) move = '*'; else 13 14 15 16 move = 'Q'; for (int x1 = (x-1); x1 setSlot (x1, (y-1), move); if (y == 6) b->setSlot (x, (y-2), '*'); 17 %3D 18 19 20 21 22 23)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

Ensure continued excellence in people management.

Answered: 1 week ago

Question

Enhance the international team by recruiting the best people.

Answered: 1 week ago