Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

class Hand {std::vector cords; public: Hand() = default; ~Hand() {} void add(con

ID: 3580623 • Letter: C

Question

class Hand {std::vector cords; public: Hand() = default; ~Hand() {} void add(const Card&); Card get(size_t index); virtual int score() const = 0; virtual void sort(); bool operatorc(const Card& rhs) const;} class PokerHand: public Hand {...}; class Blackjack Hand: public Hand {...}; Above as is a class hierarchy for different card games. which here is a none-member function that is intended to display any kind of Hand object void draw(Hand h){} What happens when a PokerHand is passed to the draw () function, assuming that the function makes use of the virtual function overridden in PokerHand? Code compiles but does not work correctly because the formal parameter was parameter was passed by value? Code complex but does not link The hand is drawn appropriately. Dies not compile because the actual argument is not the correct type.

Explanation / Answer

Question19)

Ans : D

Does not complile because the actual argument is not the correct type.