No description, website, or topics provided.
Switch branches/tags
Nothing to show
Latest commit 94158a1 Dec 6, 2017 @flawgical flawgical committed on GitHub Enterprise Update README.md
Permalink
Failed to load latest commit information.
README.md Update README.md Dec 6, 2017

README.md

classes-lab-morning

Lab - Classes

Easy

  • These are purposefully ambiguous
    • On your own, come up with attributes and methods that make sense
  • As you go down the list, some classes might be able to inherit from previous classes you've already written
  1. Create a class for a person
  2. Create a class for a pet
  3. Create a class for a boat
  4. Create a class for an artist
  5. Create a class for a robot
  6. Create a class for a computer
  7. Create a class for a dog
  8. Create a class for a painter
  9. Create a class for a car
  10. Create a class for a laptop
  11. Create a class for a humvee
  12. Create a class for a smart phone
  13. Create a class for a baby
  14. Create a class for a fire truck
  15. Create a class for a bird

Harder

  1. Create a single factory object to generate robots
    • The factory should have an array of robots that it has generated
    • A robot should have a serial number, based on what index it is in the factory's robots array
  2. Create a class for computer factories
    • A factory should have a name attribute which is set by passing a parameter into the constructor for the factory
    • A factory should have an array of computers that it has generated
    • A computer should have a serial number attribute, based on what index it is in the factory's computers array
    • A computer should have a maker name attribute, which the factory sets during generation