• Procedural (C, FORTRAN) • Functional (Haskell, OCaml, Clojure) • Object Oriented (Java, Objective-C) Java is designed to be an Object Oriented (OO) language. OO allows developer to easily create abstractions and reason about their software.
correct way to design your software. • Good OO design is tricky, so don't worry if you don't get it perfect the first time. Programming is not about typing, it's about thinking. The sooner you realize that, the sooner you'll become a better programmer. -Rich Hickey
: String ~ FieldThree : float # FieldFour : Object + methodOne(int a, int b) : int - methodTwo() : void Title is bold for concrete classes; italics for abstract classes; and surrounded by <> for interfaces Fields are listed along with their type. + Public - Private ~ Package # Protected Methods include parameters (with types) and the type of the return value
to the point of memorization) 2. Try to list out all of the potential objects required to fulfil the requirements 3. Look for overlaps in your defined objects 4. Map out your software using UML ◦ Remember to keep extensibility and maintenance in mind 5. Double check that your design meets the original requirements
design for objects that have real world counterparts. You will find when designing software that "real" objects are typically in the minority. Examples of non-"real" objects are: • Streams (Input, Output, etc) • Connection Managers • Data Structures