1 / 17

Chapter 1

Chapter 1. Sec 58 – Object Oriented Programming and Design. Chapter Objectives. Define programs, programming, and applications Read, explain, and create a class diagram Read, explain, and create an event diagram Explain object-oriented programming (OOP) and object-oriented design (OOD).

Download Presentation

Chapter 1

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 1 Sec 58 – Object Oriented Programming and Design

  2. Chapter Objectives • Define programs, programming, and applications • Read, explain, and create a class diagram • Read, explain, and create an event diagram • Explain object-oriented programming (OOP) and object-oriented design (OOD)

  3. Chapter Objectives • Define the terms objects, attributes, methods, and events • Define and explain encapsulation, inheritance, and polymorphism

  4. Object-Oriented Programming and Design • Object-oriented programming • Data and the code that operates on the data are packaged into a single unit called an object • Object-oriented design • Identifies how objects interact with each other to solve a problem

  5. Object-Speak • Aggregation • The concept of an object composed of another object • Generalization hierarchy • A tool displaying a hierarchy of classes, including superclasses and subclasses • Instance • A specific use of a class

  6. Object-Speak • Operation • Activity that reads or manipulates the data of an object • Message • Activates the code to perform one of the operations • Trigger • Causes the message to be sent • Event • The process of a trigger sending a message that results in an operation

  7. Object-Speak • An event diagram graphically represents relationships among event and operations • Useful for designing event-driven programs • Part of the Unified Modeling Language (UML) • The UML provides a standardized model to describe object-oriented designs graphically • The UML is a system of symbols to represent object behavior and program behavior

  8. Encapsulation • The process of hiding the implementation details of an object from its user • The user is shielded from the system’s complexity • An action is transparent if it takes place without any visible effect other than the desired output • Information hiding provides access to an object only through its messages • Objects can be modified without requiring application modification

  9. Inheritance • An efficient way to reuse code by defining a subclass as an extension of another class • The subclass inherits all the data and functions of the superclass • The subclass has at least one attribute or method that differs from its superclass

  10. Polymorphism • Allows an instruction to be given to an object using a generalized command • The same command will obtain different results depending on the object receiving the command • The specific actions internal to the object are encapsulated from the user

  11. What Is the Java SDK? • The Java Software Development Kit (SDK) is a programming package to develop Java applications • The Java Runtime Environment (JRE) provides the tools to deploy Java applications

  12. Features of the J2SE • The Java Compiler • Converts code into bytecode • The Java Virtual Machine • Contains an interpreter to execute the bytecode • The Java API • The standard set of packages available in Java • The Java Applet Viewer • Mini browser to display Java applets

  13. Other Java Development Tools • VATE (value-added text editor) • Color codes elements and numbers lines • Examples: TextPad, JCreator, JGrasp • IDE (integrated development environment) • Builder tool to aid coding and debugging • Examples: Sun ONE Studio, JBuilder, Visual Age, Simplicity • Web server • Deploys servlets • Example: Tomcat

  14. Summary • Alice has prepared you for Object Oriented Programming • Objects • Classes • Instances • Events • Triggers • Those concepts are used in all object oriented programming

  15. Rest of Today • Download the Java Chapter 1 Worksheet from the homework section. • All the answers are in the PowerPoint files from for Chapter 1 (sections 56-58) • Use a piece of paper for your answers – if you need a piece see me…

More Related