[Solved]Lab 631 Polymorphism Part 2 Objectives Familiarie Student Polymorphism Using Objocts Diff Q37187872
solve in c++
Lab 6.3.1 Polymorphism: part 2 Objectives Familiarie the student with: . polymorphism, or using objocts of different types through a common interface using polymorphism in real programs 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 pieces and two separate classes for the men and the kings) to chock if the moves are correct. Men can only move one ficld forward along diagonal. In international checkers,kings can move any distance forward and ackward along unblocked diagonals. To simplify your program, as sume that the board is empty and you only have to check one piece at a time. The starting postion for one of the pioces is the bl fickl. Call a check method from the pointer to the base (Pice) class. Example input Call a method to check if Plece(Man) can besoved fron b1 to c2 Call a nethod to check if Plece(King) can be noved from b1 to d3 Call a method to check İ. Piec e(Man) can be soved fron b1 to d3 Example output true false Show transcribed image text Lab 6.3.1 Polymorphism: part 2 Objectives Familiarie the student with: . polymorphism, or using objocts of different types through a common interface using polymorphism in real programs 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 pieces and two separate classes for the men and the kings) to chock if the moves are correct. Men can only move one ficld forward along diagonal. In international checkers,kings can move any distance forward and ackward along unblocked diagonals. To simplify your program, as sume that the board is empty and you only have to check one piece at a time. The starting postion for one of the pioces is the bl fickl. Call a check method from the pointer to the base (Pice) class. Example input Call a method to check if Plece(Man) can besoved fron b1 to c2 Call a nethod to check if Plece(King) can be noved from b1 to d3 Call a method to check İ. Piec e(Man) can be soved fron b1 to d3 Example output true false
Expert Answer
Answer to Lab 6.3.1 Polymorphism: part 2 Objectives Familiarie the student with: . polymorphism, or using objocts of different typ… . . .
OR

