Robotexample - smucs/Cpp11-Experimentation GitHub Wiki

RobotExample

Created after discussion with some of my students, the plan to create a good example for teaching students. Robot

  • Class = plans for the robot
  • Object = robots created based on the plans
  • Attributes = colour of the robot etc.
  • Methods = Needs some behaviours

This includes more bits a bobs mentioned by Bjarne in the Swansea University:

  • Uses a smart pointer (shared_ptr). I envisage many robots sharing a single colour object.
  • Also has a move constructor, which I think is right. Comments and changes welcome guys :-D