28-08-2012, 01:32 PM
The Object Oriented Approach to Software Engineering
1The Object Oriented.ppt (Size: 94.5 KB / Downloads: 68)
Software Engineering
The process of specifying, designing, implementing, testing, maintaining large scale software systems
Analogy with other engineering disciplines
Use of a set of principles, methods, tools, procedures, metrication to produce a high quality product
SE is a young discipline
Some History
until 60s SE was all about coding
Early languages were close to the hardware
(assemblers)
Large programs were difficult to write, debug, maintain
Languages tailored to specific application areas: Fortran - scientific
Cobol - business
Language Evolution
Driven by Abstraction
identifying important properties and discarding irrelevant ones
Software Development is model building
A program is an abstraction from reality
Abstraction isa way to control complexity
Programming language development has been influenced by the need for abstraction
Data abstraction and Procedural abstraction
Data Abstraction
Basic data type of computers is binary
Integers, reals, booleans are abstractions away from the binary bytes of which they are composed
Record in Pascal, Structs in C, arrays etc
allow more powerful abstractions
Good Programming Practice
Write functions to assign and update the internal card values and ALWAYS access the card data structures via these functions
No other functions need be aware of the internal structure of the cards (this is not enforceable in C)
The Object Oriented Approach
Key ideas: Abstraction can be enforced for data structures and associated methods (functions) for accessing those structures
objects: containers for data structures and associated methods… single name which can be manipulated
encapsulation: of data structures and methods. ONLY methods associated with object can access internal structure
classes and inheritance: a class is a generic object. Subclasses inherit data structures and methods from their parents
methods and messages
instances and instantiation: specific members of classes with assigned values for their data fields.