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
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,453评论 0 10
  • 渴望大海般深沉的土地坠入胸膛,醉梦一场让过冬的铧犁,剥掉荒芜千亩翻出旧梦,掸落草根的青涩 雨水厚重,以节气的庄严点...
    丁海鹏阅读 348评论 2 19
  • 题目描述我们可以用21的小矩形横着或者竖着去覆盖更大的矩形。请问用n个21的小矩形无重叠地覆盖一个2*n的大矩形,...
    NoFacePeace阅读 472评论 0 0