Question: question 12 CHAPTER 14 EXERCISES 517 Group to define a (draughts) board where under program control Pieces can be moved 10. can without dow that

question 12question 12 CHAPTER 14 EXERCISES 517 Group to define a (draughts) board

CHAPTER 14 EXERCISES 517 Group to define a (draughts) board where under program control Pieces can be moved 10. can without dow that looks as a window as you bel, make it heroic efforts. It should much like corners, a la- control icons. Maybe have rounded need not you could add some fake "contents: such actually as an image. do anything, t is acceptable (and indeed recommended) to have it appear within a simple window. 11. Define a Binary tree class from Sha Give the number of levels ter (levels pe. a0 means no nodes, levels 1 means one node. as a paramet top 2 means one top node with two sub nodes, levels means one node with two sub nodes each with two sub nodes, etc). Let a be represented b a small circle. Connect the nodes lines as tional. PS. In computer science, trees grow downward from a top node (amusingly, but logically, often called the 12. Modify Binary tree to draw its nodes using a virtual function. Then, derive a new class from Binary tree that overrides that virtual function to use a different representation for a node (e.g a triangle) 13. Modify Binary tree to take a parameter (or parameters) to kind of line to use to connect the nodes (e.g., an arrow pointing down or a red arrow pointing up). Note how this exercise and the last use two alternative ways of making a class hierarchy more flexible and useful on to Binary. tree that adds text to a node. You may 14. Add an operati to implement this Choose to modify the design of Binary tree string ple, you give a a way to identify a node; for examp a binary tree (the root navigating left, right, right, left, and right down node would match both init an initial r Define a class an with graphics. 15. Most class hierarchies have nothing to do that a Iterator with a pure virtual function next0 Chapter 17). Now derive Vector iterator and List iterator from Iterator so that next0 for a Vector iterator yields a pointer to the next element erator does the same for a and the first call of a Vector iterator with a there is no next ele- You initialize a first element, if any. If (iterator&) to print of nexto yields a pointer to its function void print level into ment, 0. Test this by using a a son0, ofi0, should be a the elements of a vector and functions set or 16. Define a class Controller with virtual Controller. One to on and show0. Derive at least four from the class is set some- two classes whether should where show0 prints out derived class is up off and what is the current level. The nd class. seco how control the line color a shape such Controller to control with to you. Try to find a third "thing

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!