Suggested Projects

 < Day Day Up > 



  1. Redesign RobotRat: Redesign and implement the RobotRat project to take advantage of dynamic polymorphic behavior. Create an inheritance hierarchy that will allow the addition of different types of remote controlled objects.

    Remote controlled objects will have a position and a marker. The position object will keep track of a remote controlled object's position on a two-dimensional floor (row and column). The position will also keep track of a remote controlled object's heading (NORTH, SOUTH, EAST, and WEST). The marker object will keep track of two possible positions (UP and DOWN).

    When working up your design keep in mind the following: Functionality for robot rats could be an adaptation of a remote controlled object's behavior. For instance, a remote controlled object's marker is a robot rat's tail.

    One possible inheritance hierarchy appears in the following diagram.

    click to expand

    Additional functionality could include:

    • Segregate the design of the application into three primary components: Model, View, and Controller (MVC). The MVC component organization is an important and often recurring pattern in object-oriented design. The purpose of the model is to implement the application functionality. In the above diagram, the RodentWorld class would serve as the focal point for all operations related to the management of RobotRat or other RemoteControlledObjects. The UserInterface component handles all user interface actions. The Controller component coordinates message passing between the Model and the UserInterface components.

    • Users should be able to add and delete RobotRat objects.

    • Users should be able to toggle between different RobotRat objects on the floor.

  2. Redesign Computer Simulation: Redesign and implement the computer simulation project to take advantage of dynamic polymorphic behavior. Design a suitable inheritance hierarchy that will allow the creation of different processor models and memory systems.

  3. Redesign Oil Tanker: Redesign and implement the oil tanker project presented in chapter 13, suggested project 5, to take advantage of dynamic polymorphic behavior. Design a suitable inheritance hierarchy that will allow the creation of different types of pumps and valves.

  4. Design Satellite Control System: Design and implement a satellite control system. Your system should allow the creation and control of different types of satellites.



 < Day Day Up > 



C++ for Artists. The Art, Philosophy, and Science of Object-Oriented Programming
C++ For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504028
EAN: 2147483647
Year: 2003
Pages: 340
Authors: Rick Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net