Presentation is loading. Please wait.

Presentation is loading. Please wait.

Structured Problem Solving Object- Oriented Concepts 1.

Similar presentations


Presentation on theme: "Structured Problem Solving Object- Oriented Concepts 1."— Presentation transcript:

1 Structured Problem Solving Object- Oriented Concepts 1

2 Objectives After completing the work and attending this session you will: Understand what is meant by an object- oriented approach to computing Understand the terms attribute, status and protocol

3 The idea of “Objects” An object is a piece of software that can receive and act on a message sent to it. On the right is a piece of text. This is can be regarded as an “object” We can send it messages. The Quick brown fox jumps over the lazy dog.

4 Sending Messages to Objects Bold on Italic on Bold, Italic off Font Size 30 Font Colour Red Font Comic Sans Font Colour Green Copperplate Gothic Size 36 Italic The Quick brown fox jumps over the lazy dog.

5 Sending Messages to Objects Bold on Italic on Bold, Italic off Font Size 30 Font Colour Red Font Comic Sans Font Colour Green Copperplate Gothic Size 36 Italic The Quick brown fox jumps over the lazy dog.

6 Sending Messages to Objects Bold on Italic on Bold, Italic off Font Size 30 Font Colour Red Font Comic Sans Font Colour Green Copperplate Gothic Size 36 Italic The Quick brown fox jumps over the lazy dog.

7 Sending Messages to Objects Bold on Italic on Bold, Italic off Font Size 30 Font Colour Red Font Comic Sans Font Colour Green Copperplate Gothic Size 36 Italic The Quick brown fox jumps over the lazy dog.

8 Sending Messages to Objects Bold on Italic on Bold, Italic off Font Size 30 Font Colour Red Font Comic Sans Font Colour Green Copperplate Gothic Size 36 Italic The Quick brown fox jumps over the lazy dog.

9 Sending Messages to Objects Bold on Italic on Bold, Italic off Font Size 30 Font Colour Red Font Comic Sans Font Colour Green Copperplate Gothic Size 36 Italic The Quick brown fox jumps over the lazy dog.

10 Sending Messages to Objects Bold on Italic on Bold, Italic off Font Size 30 Font Colour Red Font Comic Sans Font Colour Green Copperplate Gothic Size 36 Italic The Quick brown fox jumps over the lazy dog.

11 Sending Messages to Objects Bold on Italic on Bold, Italic off Font Size 30 Font Colour Red Font Comic Sans Font Colour Green Copperplate Gothic Size 36 Italic The Quick brown fox jumps over the lazy dog.

12 Sending Messages to Objects Each piece of information that an object holds is an Attribute. The State of an object is the set of current values of its Attributes The Quick brown fox jumps over the lazy dog.

13 Sending Messages to Objects The Quick brown fox jumps over the lazy dog. Text: The Quick brown fox jumps over the lazy dog. Colour: Blue Justification: Left Font Type: Tahoma Font Size: 24 Bold: Off Italic: Off This blue box describes the state of the text. The items within it are called the attributes of the text

14 Sending Messages to Objects The Quick brown fox jumps over the lazy dog. MESSAGE: Change Colour to Red MESSAGE: Change Colour to Red Text: The Quick brown fox jumps over the lazy dog. Colour: Blue Justification: Left Font Type: Tahoma Font Size: 24 Bold: Off Italic: Off The current state of the text.

15 Sending Messages to Objects The Quick brown fox jumps over the lazy dog. MESSAGE: Change Colour to Red MESSAGE: Change Colour to Red Text has now changed Text: The Quick brown fox jumps over the lazy dog. Colour: Red Justification: Left Font Type: Tahoma Font Size: 24 Bold: Off Italic: Off The new state of the text.

16 Sending Messages to Objects The Protocol for an object is the set of messages that an object understands. Two objects may behave very differently when given the same message The Quick brown fox jumps over the lazy dog.

17 Sending Messages to Objects Size = 8 The Quick brown fox jumps over the lazy dog.

18 Classes of Objects Picture Class Text Class The Quick brown fox jumps over the lazy dog.

19 Classes of Objects Student Class Furniture Class Joanne Brett Abid Chairs Cupboards Bookcases

20 An Object Lesson Here is a Table in PowerPoint What are its attributes? X O

21 An Object Lesson Rows: 3 Columns: 3 Border: On Border Style Width: 1pt Cell Contents: (1,1): “ ”, (1,2): “X” etc. Background: Clear X O

22 Modelling the Real World Computers attempt to model the real world. In this case, TF’s cluttered desk!


Download ppt "Structured Problem Solving Object- Oriented Concepts 1."

Similar presentations


Ads by Google