Lesson 7
Object Orientation Conclusion
This module discussed how an object contains both 1) information and 2) behavior and that defining a class means defining both the information and the behavior in the class.
You learned how to:
- Assign responsibilities to the appropriate class
- Identify the collaborators, if any, for each responsibility
- Keep information with the code that uses it, for maximum encapsulation
- Recognize problems for which traditional programming is still the best technique
- Recognize programs for which object-oriented programming is the best technique
Glossary
This module introduced you to the following terms:
- Collaboration
- CRC Modeling
- Data flow programming
- Encapsulation: Black Box Principle
- Fourth-generation language
- Functional Programming
- Implementation
- Interface
- Object
- Responsibilities: Things that a class knows or things the class does; setting a class responsibilities is one of first steps in defining a class.
The next module will discuss more specific benefits of the object-oriented approach.
Data Flow Programming
In computer programming, dataflow programming is a programming paradigm that models a program as a directed graph of the data flowing between operations, thus implementing dataflow principles and architecture. Dataflow programming languages share some features of functional languages, and were generally developed in order to bring some functional concepts to a language more suitable for numeric processing. Some authors use the term Datastream instead of Dataflow to avoid confusion with Dataflow Computing or Dataflow architecture, based on an indeterministic machine paradigm.
Dataflow programming was pioneered by Jack Dennis and his graduate students at MIT in the 1960s.
Functional Programming
In computer science, functional programming is a programming paradigm.
A style of building the structure and elements of computer programs that treats computation as the evaluation of mathematical functions and avoids 1) changing-state and 2) mutable data. It is a declarative programming paradigm, which means programming is done with expressions. In functional code, the output value of a function depends only on the arguments that are input to the function, so calling a function f
twice with the same value for an argument x will produce the same result f(x) each time.
Eliminating side effects, i.e. changes in state that do not depend on the function inputs, can make it much easier to understand and predict the behavior of a program, which is one of the key motivations for the development of functional programming.
Object Characteristics - Quiz
Click the Quiz link below to test your knowledge of responsibilities, encapsulation, and when OOP is the right approach.
Object Characteristics - Quiz