©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.

Slides:



Advertisements
Similar presentations
Computer Science Dept. Fall 2003 Object models Object models describe the system in terms of object classes An object class is an abstraction over a set.
Advertisements

Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 4 Defining Your Own Classes.
Object-Oriented Analysis and Design
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Introduction To System Analysis and Design
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 4 Defining Your Own Classes.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Software Development Software Life Cycle UML Diagrams.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Object-oriented programming concepts An Introduction.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Chapter Chapter 1 Introduction to Object-Oriented Programming and Software Development.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 4 Defining Your Own Classes.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Lecture 1 Introduction to Computers and Object-
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 1 Introduction to Object-Oriented Programming.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Software Engineering Software Development Process.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Introduction To System Analysis and design
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 2: Modelling.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 1: Introduction to Object-Oriented Programming.
BCS 2143 Introduction to Object Oriented and Software Development.
Chapter 8 More Object Concepts
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
SE-1010 Dr. Mark L. Hornick 1 Introduction to Object-Oriented Programming (OOP) Part 1.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Introduction to Java August 14, 2008 Mrs. C. Furman.
Introduction To System Analysis and Design
Software Life Cycle Requirements and problem analysis. –What exactly is this system supposed to do? Design –How will the system solve the problem? Coding.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Object-oriented programming concepts An Introduction.
1 Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill Chapter 2: Object Basics Object-Oriented Systems Development Using the Unified Modeling.
Chapter 5 Models and UML Notation for The Object-Oriented Approach.
Systems Analysis & Design 7 th Edition Chapter 5.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
CIS 112 Exam Review. Exam Content 100 questions valued at 1 point each 100 questions valued at 1 point each 100 points total 100 points total 10 each.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
© 2000 McGraw-Hill Modified by C.W.Pang with author's permission Intro to OOP with Java--Wu Chapter Chapter 1 Introduction to Object-oriented Programming.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Getting Started with Java: Object declaration and creation Primitive.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Objective You will be able to define the basic concepts of object-oriented programming with emphasis on objects and classes by taking notes, seeing examples,
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
بسم الله الرحمن الرحيم CPCS203: Programming II. ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display., Modifications by Dr.
Introduction to Computers and Programming Languages CS 180 Department of Computer Science Purdue University.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Object-Oriented Analysis and Design
Introduction to OOP with Java 4th Ed, C. Thomas Wu
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Intro to OOP with Java, C. Thomas Wu
Presentation transcript:

©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Topics Object-oriented programming classes and objects inheritance Unified Modeling Language Software Development cycle

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Programming Programs are used to specify what a computer should do Procedural a recipe for what needs to be done step-by-step instructions Object-oriented program is a model work gets done as different components of the model interact We'll take the object-oriented approach

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Classes and Objects Object-oriented programs use objects. An object is a thing, either tangible or intangible. Account, Vehicle, Employee, etc. are examples of possible objects. An object is comprised data operations that manipulate the data

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Classes and Objects To create an object inside the computer program, we must provide a definition for objects—how they behave and what kinds of information they maintain—called a class. An object is created following the model provided by the class. An object is an instance of a class.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Classes and objects A class serves as a template from which an object can be constructed Like a cookie cutter - all cookies have the same shape but they are distinct objects Like a factory - all the objects coming off an assembly line are similar but they are different objects Like data on a form - each object has the same type of data but the actual information is different

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Messages and Methods To instruct a class or an object to perform a task, we send a message to it. You can send a message only to the classes and objects that understand the message you sent to them. Each class can have any number of methods corresponding to the messages it can receive

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Messages and Methods A class or an object must possess a matching method to be able to handle the received message. A method defined for a class is called a class method, and a method defined for an object is called an instance method. A value we pass to an object when sending a message is called an argument of the message.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Unified Modeling Language When you get ready to write a program, you need a way to plan what needs to be done In a procedural approach to programming, you might draw a flow chart In object-oriented programming, we make UML diagrams show the features of a class show relationships between classes show relationships between objects

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Object Diagrams A graphical representation of an object. An object diagram can contain Object name Class name Object data

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sample Object Diagrams UML notation for objects and classes: Two Bicycle objects with the names Moto-1 and Moto-2 and one Customer object with the name Jon Java.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Class Diagrams A class diagram is graphical representation of a class. It contains the name of the class and possibly information about its information and data

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Communicating with Objects One-way communication: Sending the message walk to a Robot object. These are called procedures in some programming languages.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Two-way communication: The result distance is returned to the sender of the message. These are called function in some programming languages

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sometimes a class needs to maintain some information about the class as a whole rather than about a particular object Similarly, you may need to send messages to the class itself rather than to a particular object.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. An example of a class method: The maximum possible speed of all Robot objects is returned by the class method getMaximumSpeed.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Class and Instance Data Values An object is comprised of data values and methods. An instance data value is used to maintain information specific to individual instances. For example, each Account object maintains its balance.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Class and Instance Data Values A class data value is used to maintain information shared by all instances or aggregate information about the instances. For example, minimum balance is the information shared by all Account objects, whereas the average balance of all Account objects is aggregate information.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. An example of an instance data value: Three Account objects possess the same data value current balance, but the actual dollar amounts differ.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Class data example Three Account objects sharing information (minimum balance = $100) stored as a class data value.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Another example of class data Three Cafeteria objects sharing the same opening and closing times, stored as class data values.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. An example of inefficient program design: Three Account objects duplicating information (minimum balance = $100) in instance data values. Why store the same information in multiple places if it always should be the same?

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Object Diagrams Revisited Four types of data values: class variable, class constant, instance variable, and instance constant.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Inheritance In object-oriented programming, we use a mechanism called inheritance to design two or more entities that are different but share many common features. Inheritance allows programmers to re- use the work put into developing one class when developing similar ones

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Inheritance First, we define a class that contains the common features of the entities. Then we define classes as an extension of the common class inheriting everything from the common class.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Inheritance We call the common class the superclass and all classes that inherit from it subclasses. We also call the superclass an ancestor and the subclass a descendant. Or we can call the superclass the parent class and the subclass the child class.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Inheritance Example A superclass Account and its subclasses Savings and Checking.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Inheritance Hierarchy A UML diagram showing the inheritance hierarchy for different types of students.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Software Engineering Software engineering is the application of a systematic and disciplined approach to the development, testing, and maintenance of a program.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Software Life Cycle The sequence of stages from conception to operation of a program is called software life cycle. Five stages are Analysis Design Coding Testing Operation and Maintenance

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Software Life Cycle Analysis phase: Study the problem. Determine if a solution is possible. Develop a requirements specification describing the features of the program.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Software Life Cycle Design phase: Turn the requirements specification into a detailed program design. Fully define all classes and objects, including how they behave and communicate between themselves.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Software Life Cycle Coding phase: Implement the detailed design into an actual program.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Software Life Cycle Testing phase: Run the program using different data sets to verify the program works properly. Unit testing: Test classes individually. Integration testing: Test that the classes work together correctly.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Software Life Cycle Operation phase: Program is put into use. Software maintenance accounts for approximately 70% of the cost of the software.