Object-Oriented Programming
|
Java supports the Object-Oriented Programming (OOP) approach.
OOP focuses on the design of data-types rather than algorithms
called objects or classes
Why is this distinction important?
Objects are nouns, Algorithms are verbs
Which is an easier task?
identify the actions that apply to a given noun
identify those objects to which a given action might be applied
What is easier?
identifying similar object classes
specifying general-purpose algorithms
Advantages of OOP
- promotes design abstraction (hiding details)
- promotes code reuse
- consolidates specification and interface-- encapsulation
|
|