Thursday, May 16, 2013

Data Structure and Algorithm Study Notes 1

For object-oriented design approach, the three FUNDAMENTAL TO OO-DESIGN list below is important:
  • Abstraction
  • Encapsulation
  • Modularity
The main idea of abstraction is to distill a complicated system down to its most fundamental parts and describe these parts in a simple, precise language. (Example: "edit" menu in a text-editor GUI, copy or paste will not appear unless click the menu)
Encapsulation, or information hiding, states that different components of a software system should implement an abstraction, without revealing the internal details of that implementation. (Example: "edit" menu itself tells the functionality very well)
Modularity refers to an organizing structure, in which the different components of a software system are divided into separate functional units. (Example: organized architect designed house - electrical, heating and cooling, plumbing and structural [interact in well-defined ways: In doing so, he or she is using modularity to bring a clarity of thought that provides a natural way of organizing functions in to distinct manageable units]) 

Notation:
The "Big-Oh" Notation
f(n) is O(g(n)) if there is a real constant c>0 and an integer constant m>=1 such that f(n)<=cg(n) for every integer n>=m.
//NOTE: Usually, g(n) is the highest order of f(n).

The "Big-Omega" Notation
f(n) is Ω(g(n)) if there is a real constant c>0 and an integer constant m>=1 such that f(n)>=cg(n) for every integer n>=m.

The "Big-Theta" Notation
f(n) is Θ(g(n)) if f(n) is O(g(n)) and Ω(g(n)) at the same time.

No comments:

Post a Comment