Programming Paradigm: Procedural Concept  The main program coordinates calls to procedures in separate modules and hands over appropriate data as parameters 4

Procedural Concept - Problems  Decoupled Data and Operations  The resulting modular structure is oriented on the operations rather than the actual data  The defined operations specify the data to be used.  The design is: What data we have, and what operations we need to manipulate it? 5

This preview
has intentionally blurred sections.
Sign up to view the full version.

Object-Oriented Concept (in C++)  Objects of the program interact by sending messages to each other 6

Procedural vs. Object-Oriented Programming Procedural Object-oriented 7  Action-oriented – concentrates on the verbs Programmers :  Identify basic tasks to solve problem  Implement actions to do tasks as subprograms (procedures/ functions/subroutines)  Group subprograms into programs/modules/libraries, together make up a complete system for solving the problem  Focuses on the nouns of problem specification Programmers :  Determine objects needed for problem  Determine how they should work together to solve the problem  Create types called classes with  data members  function members to operate on the data  Instances of a type (class) are called objects

This preview
has intentionally blurred sections.
Sign up to view the full version.

Classes  Classes allow you to build “smart” objects that can answer many questions (and perform various actions).  “What is your temperature?”  “What is your temperature in Fahrenheit?”  “What is your humidity?”  “Print your temperature in Kelvin.”  Objects may send messages to each other, which in turn affect the operations of the objects. This leads to different outcomes of the program 8

OOD: Object-Oriented Design 9  Identify the objects in the problem's specification and their types  Identify the operations or tasks to manipulate the objects FinancialAidAward amount source getAmount() getsource() display() setAmount() setSource() data operations Think of them as Containers

This preview
has intentionally blurred sections.
Sign up to view the full version.

First Look at ADTs & their Implementation  For a programming task we must identify  The collection of data items  Basic operations or algorithms to be performed on them  The two taken together (data items & operations) form an Abstract Data Type (ADT)  As an application developer, you do not need to worry about

This is the end of the preview. Sign up
to
access the rest of the document.