ArticlesPPT's presented at Ruia college in TechStorm
Knowledge Engineering
The Real World
Understanding the Real World
Capturing Knowledge
Computational Models
Representation Suitable for Computers
 
ArticlesObject Oriented Programming Pros & Cons 2
Knowledge Engineer
The greatest joy is joy of creation, yes we create programs
The joy is in giving. Yes we give our intelligence to our program. Our knowledge our intelligence is captured in our program.
 
ArticlesObject Oriented Programming Pros & Cons 3
Stages in Engineering
Understanding Requirements
Visualizing a Solution
Implementing the Solution
 
ArticlesObject Oriented Programming Pros & Cons 4
Impact of unit of Construction Problem Solving
A Brick?
A Wall?
A Room?
A Floor?
 
ArticlesObject Oriented Programming Pros & Cons 5
Computational Models
Procedural
Object Oriented
Database
Event Driven
Aspect Oriented
Subject Oriented
Filter Based
Meta Programming
 
ArticlesObject Oriented Programming Pros & Cons 6
Building Blocks
Op-codes
Structures like loops and conditional statements
Variables
Fuctions / Procedures
Objects
Components
Tables
Queries
Aspects
Design Patterns
As the solution grows more complex larger unit of constructions are more suitable
 
ArticlesObject Oriented Programming Pros & Cons 7
Piggy Bank
A piggy bank houses coins
Coins can be inserted in the piggy bank
Coins can be removed from piggy bank
There are several piggy banks so each one has be given a unique ID
 
ArticlesObject Oriented Programming Pros & Cons 8
C Program
struct PiggyBank {
	int id;
	int balance;
	int lasttransaction;
};

struct PiggyBank p1, p2, p3;

p1, p2, p3 represents three PiggyBanks.

 
ArticlesObject Oriented Programming Pros & Cons 9
C Program specific to P1
void deposit (int amount) {
	p1.balance = p1.balance + amount;
	p1.lasttransaction = amount;
}

void withdraw (int amount) { 
	int temp;
	temp = p1.balance - amount;
	if( temp >= 0) {
		p1.balance = p1.balance - amount;
		p1.lasttransaction = -amount;
	}
}
 
ArticlesObject Oriented Programming Pros & Cons 10
C Program Generalized
void deposit ( struct PiggyBank *p, int amount) {
	p->balance = p->balance + amount;
	p->lasttransaction = amount;
}

void withdraw ( struct PiggyBank *p, int amount) {
	int temp;
	temp = p->balance - amount;
	if( temp >= 0) {
		p->balance = p->balance - amount;
		p->lasttransaction = -amount;
	}
}
 
ArticlesObject Oriented Programming Pros & Cons 11
Listing Elements
Structure
State
Common Behavior
 
ArticlesObject Oriented Programming Pros & Cons 12
Problems with Procedural Models
Variables can be manipulated by any functions
We cannot associate behavior with structure
State being open can be manipulated by any functions
 
ArticlesObject Oriented Programming Pros & Cons 13
Data Base
Create Table PiggyBank
Id Balance Last Transaction
01 3000 252
     
     
 
ArticlesObject Oriented Programming Pros & Cons 14
Data Base
Each row in PigggyBank table represents PiggyBank
To model the withdraw and deposit actions we will have to use the update statement
A check constraint on balance column will ensure that the balance is >= 0
 
ArticlesObject Oriented Programming Pros & Cons 15
Class
Layout
Message
Behavior
 
ArticlesObject Oriented Programming Pros & Cons 16
Class PiggyBank
Class PiggyBank {
	int id;
	int balance;
	int lasttransaction;
	
	void deposit(int amount) {
		balance = balance + amount;
		lasttransaction = amount;
	}

	void withdraw(int amount) {
		int temp = balance - amount;
		if (temp >= 0){
			balance = balance + amount;
			lasttransaction = -amount;
		}
	}
}
 
ArticlesObject Oriented Programming Pros & Cons 17
Instance ( state )
PiggyBank a = new PiggyBank();
 
ArticlesObject Oriented Programming Pros & Cons 18
Procedural v/s Object Oriented
Variables have ability of Knowing
Procedures have ability of Doing
Objects have Knowing and Doing ability
 
ArticlesObject Oriented Programming Pros & Cons 19
Whole > sum of parts
Quantum Physics
The components
The system
The Alchemy of patterns
The Systemic View (Outside the Box)
The Component View (inside the Box)
 
ArticlesObject Oriented Programming Pros & Cons 20
Object
Unit of Responsibilty
Conversion is possible between knowing and doing. What remains invariant is the responsibility.
 
ArticlesObject Oriented Programming Pros & Cons 21
Object
State
Structure
Messages
Behavior
 
ArticlesObject Oriented Programming Pros & Cons 22
Object Advantage
Encapsulates state and behavior
Unit of responsibility
Data Hiding
Change Management
Messages
 
ArticlesObject Oriented Programming Pros & Cons 23
Limitations
Adding print functionality
Issues in Procedural Model
Issues in Database Model
Issues in Object Model
 
ArticlesObject Oriented Programming Pros & Cons 24
The Future Trends
Component Based Programming will Thrive
Aspect Oriented Programming
Mobile Agents
Design Patterns will take center stage
 
support@rajeshpatkar.com
Rajesh Patkar Institute Of Software Engineering
26/A Patel Shopping Center, Ground Floor, Sainath Road, Opp Malad Subway, Malad (W), Mumbai.
Tel: 9820860292, 9820396074, 30903720, 28076817.