Programming Tricks

Define classes

  • What is the data that you want to deal with?
  • What will one instance of your class represent?
  • What information should each instance have as instance variables?
  • What instance methods should each instance have?
  • What should the printed version of an instance look like?

Gold Rules

  • The big trick is to understand everything you want to do first in your own words, so then you are translating them to the computer.
  • Start Small, keep it working

你可能感兴趣的:(Programming Tricks)