본문 바로가기

Object Oriented Design with Java

렉쳐 3 리뷰

<Head first ooad 5장 1부> 

Abstract class, association arrow, aggregation arrow, Inheritance arrow(generalization)

229쪽


The difference between an abstract class and an interface:

C++ has multiple inheritance

Java- Single inheritance with interfaces for 'adding' more inheritance

Lots of the same stuff to inherit? then use abstract classes first the interfaces for other smaller things

Lots of different types of small stuff to 'inherit'? use interfaces.


is a / has a (206페이지 ooad)

has a - association

is a - generalization


196페이지

Noun analysis: You do this to your use case to figure out what classes you need in your system.

Multiplicity: Describes how many of a specific type can be stored in an attribute of a class.

Attribute: This is the UML term that usually represents a method in one of your classes.

Class diagram: Lists all the code-level constructs, along with their attributes and operations

Operation: Equivalent to a member variable in a class.

Association: Visually shows that one class has a relation to another class, usually through an attribute.

Verb analysis: Helps you figure out the candidate for methods on the objects in your system.


Abstract classes are placeholders for actual implementation classes. The abstract class defines behavior, and the subclasses implement that behavior.


Classes should be open for extension but closed for modification. Whenever you find common behavior in two or more places, look to abstract that behavior into a class, and then reuse that behavior in the common classes







'Object Oriented Design with Java' 카테고리의 다른 글

렉쳐 5 리뷰  (0) 2015.11.08
렉쳐 4 리뷰  (0) 2015.11.08
클래스 다이어그램 설명 펌  (0) 2015.11.08
렉쳐 2 리뷰  (0) 2015.11.08
Refactor 뜻  (0) 2015.11.08