object orientation what is it all about n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
“Object-orientation” – what is it all about? PowerPoint Presentation
Download Presentation
“Object-orientation” – what is it all about?

Loading in 2 Seconds...

play fullscreen
1 / 53

“Object-orientation” – what is it all about? - PowerPoint PPT Presentation


  • 124 Views
  • Uploaded on

“Object-orientation” – what is it all about?. Gill Harrison, Innovation North. Aims and Objectives this week. To appreciate what is meant by “object-orientation’ how it arose why it is a useful approach. What is Object-Orientation?.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '“Object-orientation” – what is it all about?' - jatin


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
aims and objectives this week
Aims and Objectives this week

To appreciate

  • what is meant by “object-orientation’
  • how it arose
  • why it is a useful approach
what is object orientation
What is Object-Orientation?
  • A method of writing programs and developing software that is “oriented” (or orientated or directed) towards the use of objects
what are objects
What are objects?

A software object is

what are objects1
What are objects?

A software object issomething which holds both

what are objects2
What are objects?

A software object is something which holds bothdata

what are objects3
What are objects?

A software object is something which holds bothdata

what are objects4
What are objects?

Stock object

A software object is something which holds bothdata

Stock CodeDescriptionNumber in StockUnit cost

what are objects5
What are objects?

Stock object

A software object is something which holds bothdataand the program instructions (organised into “methods”) for processing that data

Stock CodeDescriptionNumber in StockUnit cost

what are objects6
What are objects?

Stock object

A software object is something which holds bothdataand the program instructions (organised into“methods”)for processing that data

Stock CodeDescriptionNumber in StockUnit cost

what are objects7
What are objects?

Stock object

A software object is something which holds bothdataand the program instructions (organised into“methods”)for processing that data

Stock CodeDescriptionNumber in StockUnit costMethod to change the Number in StockMethod to calculate value

how is a system built
How is a system built?

One object can send a “message” to another asking it to perform one of its methods on its data

how is a system built1
How is a system built?

One object can send a “message” to another asking it to perform one of its methods on its data

Stock object

Stock CodeDescriptionNumber in StockUnit costMethod to change the Number in StockMethod to calculate value

how is a system built2
How is a system built?

One object can send a “message” to another asking it to perform one of its methods on its data

Stock object

Stock CodeDescriptionNumber in StockUnit costMethod to change the Number in StockMethod to calculate value

an object dealing with goods received

how is a system built3
How is a system built?

One object can send a “message” to another asking it to perform one of its methods on its data

Stock object

Stock CodeDescriptionNumber in StockUnit costMethod to change the Number in StockMethod to calculate value

increase your number in stock by 1000

an object dealing with goods received

if you re interested this is java
If you’re interested (this is Java)...

public class Stock {

private String stockCode, description;

private int numberInStock, unitCost;

public void changeNumberInStock(.......) {

some lines of program code here

}

public float calculateValue() {

lines of code

}

}

data

methods

if you have met programs before
If you have met programs before..

You will realise that programs generally have

  • variables to hold data
  • procedures and functions, which seem to be like methods
  • calls to these procedures and functions, which seem like messages
  • So what’s new about objects?
encapsulation
Encapsulation

The details of data and methods are shielded from outside view or interference. This is called “encapsulation”.

Stock CodeDescriptionNumber in StockUnit costMethod to change the Number in StockMethod to calculate value

encapsulation1
Encapsulation

The details of data and methods are shielded from outside view or interference. This is called“encapsulation”.

Stock CodeDescriptionNumber in StockUnit costMethod to change the Number in StockMethod to calculate value

encapsulation2
Encapsulation

The details of data and methods are shielded from outside view or interference. This is called“encapsulation”.

Just send me messages and I’ll send replies

a bit of history
A bit of history
  • Objects arose via programming languages rather than via Analysis and Design
  • In the 1960s, the first language to use objects was Simula, a simulation language. A vehicle or a lift could be modelled more easily this way
a bit of history1
A bit of history
  • in the 1970s, an important research team at Xerox Palo Alto Research Centre (Xerox PARC) produced
    • ideas about Graphical User Interfaces (GUIs) and
    • Smalltalk - the first pure O-O language
  • Programs with GUIs are “event-driven” - these are much easier to write if you use software objects
object oriented programming languages
Object-oriented Programming languages
  • Simula - a simulation language
  • Smalltalk - the first pure O-O language
  • Eiffel
  • C++ (C with objects)
  • Java
features of object orientation
Features of object-orientation
  • We define a general class of objects we are interested in, e.g. students, customers, orders
  • A specific individual of the class is called an object, or an instance
  • We define attributes of the class, which will have particular values for each instance
  • We define methods for the class, which any instance will be able to carry out in response to a message
objects and entities
Objects and Entities

OBJECTS ENTITIES

class is like entity type

instance is like occurrence

attribute is like attribute?

method has no equivalent -

objects and entities1
Objects and Entities

Objects seem like entities, with processing added in.

But ERDs show entities and DFDs show processing.

absorbs bits of processing15
absorbs bits of processing

Hey, I’m an object!

evolution of systems analysis and design methods
Evolution of Systems Analysis and Design methods
  • Methods using Structure Charts and Data Flow Diagrams
  • ..... plus Entity Relationship Diagrams
  • Object-Oriented Analysis and Design Methods
relative maturity
Relative maturity

Mature Immature

O-O Programming Languages

O-O Databases

O-O Analysis and Design

object oriented analysis and design methods
Object-Oriented Analysis and Design Methods

Lots, often associated with the name of a person:

  • Rumbaugh - Object Modeling Technique (OMT)
  • Jacobsen - Object Oriented Software Engineering (OOSE)
  • Booch
  • Coad and Yourdon
  • Wirfs-Brock
  • Schlaer and Mellor
object oriented analysis and design methods1
Object-Oriented Analysis and Design Methods

Lots, often associated with the name of a person:

  • Rumbaugh - Object Modeling Technique (OMT)
  • Jacobsen- Object Oriented Software Engineering(OOSE)
  • Booch
  • Coad and Yourdon
  • Wirfs-Brock
  • Schlaer and Mellor

have combined to create Unified Modeling Language (UML)

what use is it
What use is it?
  • Stock balance now held as
    • balance at stock-taking
    • total number received since then
    • total number issued since then
  • Without objects - detailed changes to every program that deals with stock
  • With objects - just change stock methods: other objects send the same messages as before
what use is it1
What use is it?
  • Resilience to change - data is stable, processing is not
  • Small changes are localised
  • Far better chance of reusing objects than of reusing separate data and processes
  • Standard classes (e.g. for GUI features like buttons, list boxes) make software development faster and easier
what use is it2
What use is it?

These factors should give rise to

  • faster development of software
  • software than is more reliable and error-free
  • software that is easier to change to meet new requirements
achieved objectives
Achieved objectives?
  • A software object holds:

data (like an entity in an ERD) / processing (like a process in a DFD) / both?

  • The hiding of the internal workings of an object is called
  • Objects communicate by passing
  • Why has Object-Orientation arisen?