SlideServe
Menu
Préférences
© SlideServe · v2026

Introduction Object-Oriented Programming

venessac avatar
17 diapositives · 200 Views · Jan 04, 2020

Introduction Object-Oriented Programming. The Journey So Far. Procedural Programming. using Pseudocode. You are here. The Destination. Procedural Programming. Object Oriented Programming. using Pseudocode. using Java. Introduction.

Introduction Object-Oriented Programming - slide 1
01 / 17Introduction Object-Oriented Programming
1 / 17

Télécharger la présentation

Introduction Object-Oriented Programming
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. IntroductionObject-Oriented Programming

  2. The Journey So Far Procedural Programming using Pseudocode You are here

  3. The Destination Procedural Programming Object Oriented Programming using Pseudocode using Java

  4. Introduction • We are going to introduce two concepts at the same time: • Object-Oriented Programming • Programming in a real language • Why? • Pseudocode is a good preparation for learning any language. • The Object Oriented paradigm is a significant factor in modern programming • We feel that an introductory course should at a minimum give students a good taste of real programming • Many students have asked for exposure to a real language • Excellent preparation for CS 1312

  5. Introduction • We will not abandon the principles you have learned so far: • modularity • abstraction • the necessity to visually validate the logic • Today we will give some basic ideas about: • Object Oriented Programming • Working with a real language: Java

  6. Object Oriented Programming • A different programming style • A different way of thinking • Origins • Problems with very large systems becoming unmanageable (> 100,000 lines of code) • Graphical User Interfaces (e.g. Macintosh, Windows) required a different way of programming due to complex interactions of windows, mouse clicks, etc. • Xerox PARC: Smalltalk • C++ as an enhancement to C • Java as a Web language

  7. To be more specific...

  8. The Scenario • Recall the concept of a Queue: • Defined by a set of behaviors • Enqueue to the end • Dequeue from the front • First in, first out Items

  9. Where is the Queue? • The logical idea of the queue consisted of: • Data stored in some structure (list, array, etc.) • Modules to act on that data • But where is the queue? • We’d like some way of representing sucha structure in our programs.

  10. Why? • We would like to have reusable “drop-in” programming components we could use to solve problems. • We would like to encapsulate the data and the behaviors in order to “protect” it from misuse. • We would like clear interfaces between different parts of programs • We would like a programming system that was extensible • We would like a programming language that would be excellent for modeling real world objects

  11. Issues • As is, there is no way to “protect” against violating the specified behaviors. Procedure Enqueue Procedure Dequeue The Queue Data Sneak into Middle

  12. Issues • If our queue could somehow be packaged we could drop in a “queue object” whenever we needed it. Queue Acme Manufacturing

  13. Queue Enqueue Dequeue Acme Manufacturing Issues • We’d like a way to put a “wrapper” around our structure to protect against intrusion. Sneak into Middle

  14. Issues Contract The party of the first part hereinafter known as the queue agrees to... The party of the second part hereinafter known as the application agrees to... Clear lines of responsibility

  15. CountingQueue Enqueue Size Dequeue Acme Manufacturing Issues • I need a queue that can tell me how many items it contains... Queue Enqueue Dequeue Acme Manufacturing “Magic Process”

  16. Signal Car $ Student BankAccount Issues Elevator Signal Object Elevator Object Student Object Car Object BankAccount Object Real World Objects!