[Solved]Lab 631 Polymorphism Part 2 Objectives Familiarize Student Polymorphism Using Objects Diff Q37169016
solve in c++Lab 6.3.1 Polymorphism: part 2 Objectives Familiarize the student with: polymorphism, or using objects of diffarent typas through a common int arfce using polymorphism in real prograns Scenario Let’s assume you write a code for the game of checkers (aka draughts). There are two types of pieces in this game: men and kings. You need to implement classes (one abstract for the picc as and two separate classes for the man and the kings) to check if the moves are correct. Man ean only move one fiekl forward akong diagonak. In int arnational chec kers, kings can move any distance forward and hackward akong unblocked diagonals. To simplify your program, assume that the board is ampty and you ony have to check one piece at a time. The starting position for one of the pieces is the bl fickl. Call a check method from the pointer to the base (Piece) class Example input Call a method to check if Piece(Man) can be moved from bl to c2 call a method to check İf Piece(King) can be noved from bi to d3 call a method to check if Piece(Man) can bemoved from bi to d3 Example output true true false Show transcribed image text Lab 6.3.1 Polymorphism: part 2 Objectives Familiarize the student with: polymorphism, or using objects of diffarent typas through a common int arfce using polymorphism in real prograns Scenario Let’s assume you write a code for the game of checkers (aka draughts). There are two types of pieces in this game: men and kings. You need to implement classes (one abstract for the picc as and two separate classes for the man and the kings) to check if the moves are correct. Man ean only move one fiekl forward akong diagonak. In int arnational chec kers, kings can move any distance forward and hackward akong unblocked diagonals. To simplify your program, assume that the board is ampty and you ony have to check one piece at a time. The starting position for one of the pieces is the bl fickl. Call a check method from the pointer to the base (Piece) class Example input Call a method to check if Piece(Man) can be moved from bl to c2 call a method to check İf Piece(King) can be noved from bi to d3 call a method to check if Piece(Man) can bemoved from bi to d3 Example output true true false
Expert Answer
Answer to Lab 6.3.1 Polymorphism: part 2 Objectives Familiarize the student with: polymorphism, or using objects of diffarent typa… . . .
OR

