How do you design object oriented projects?

what are things you do during the high level design phase (before you begin programming) to determine what are the classes you need (especially ones not based on any 'real world objects') and how will they interact with each other?

 

The steps that I use for initial design (getting to a class diagram), are:

  1. Requirements gathering. Talk to the client and factor out the use cases to define what functionality the software should have.

  2. Compose a narrative of the individual use cases.

  3. Go through the narrative and highlight nouns (person, place, thing), as candidate classes and verbs (actions), as methods / behaviors.

  4. Discard duplicate nouns and factor out common functionality.

  5. Create a class diagram. If you're a Java developer, NetBeans 6.7 from Sun has a UML module that allows for diagramming as well as round-trip engineering and it's FREE. Eclipse (an open source Java IDE), also has a modeling framework, but I have no experience with it. You may also want to try out ArgoUML, an open source tool.

  6. Apply OOD principles to organize your classes (factor out common functionality, build hierarchies, etc.)

posted on 2013-11-07 01:15  Step-BY-Step  阅读(148)  评论(0编辑  收藏  举报

导航