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

Slides:



Advertisements
Similar presentations
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Advertisements

Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
©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
Introduction To System Analysis and Design
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.
Object Oriented System Development with VB .NET
©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.
Chapter 1 Introduction to Object- Oriented Programming and Problem Solving.
©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. COMPSCI 125 Introduction to Computer Science I.
Chapter Chapter 1 Introduction to Object-Oriented Programming and Software Development.
©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-
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 0 Introduction to Computers and Programming.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 1 Introduction to Object-Oriented Programming.
©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. 4 th Ed Chapter Software Engineering Software Development Process.
Chapter 1 The Systems Development Environment Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Chapter 1 The Systems Development Environment
Introduction To System Analysis and design
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 0 - Introduction to Computers and Programming.
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.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
BCS 2143 Introduction to Object Oriented and Software Development.
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.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 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.
Object-oriented programming concepts An Introduction.
Systems Analysis & Design 7 th Edition Chapter 5.
Software Basics. Some Pioneers Charles Babbage Analytical Engine Countess Ada Lovelace First Programmer ? John Von Neumann storing instructions in memory.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of 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 Programming •Object-Oriented Programming (OOP) allows you to create your program based upon modeling objects.  Your program’s properties.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Getting Started with Java: Object declaration and creation Primitive.
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,
Next Back MAP MAP F-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All.
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.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
CHAPTER 6 OBJECT ANALYSIS.
بسم الله الرحمن الرحيم 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.
Introduction to OOP with Java 4th Ed, C. Thomas Wu
Programming Languages
Appendix A Object-Oriented Analysis and Design
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Appendix A Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
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 Objectives After you have read and studied this chapter, you should be able to Name the basic components of object-oriented programming. Differentiate classes and objects. Differentiate class and instance methods. Differentiate class and instance data values.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Objectives, cont. After you have read and studied this chapter, you should be able to Draw program diagrams using icons for classes, objects, and other components of object- oriented programming. Describe the significance of inheritance in object-oriented programs. Name and explain the stages of the software life cycle.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 0. A bit of background… Charles Babbage invented the Difference and Analytical Engines, precursors to the modern computer. Ada Lovelace is considered the first computer programmer. The first two modern computers were MARK I and ENIAC I. John von Neumann invented the stored-program approach of executing programs. Computers are connected into a network. Interconnected networks are called internets. Binary numbers are used in computers. A typical computer consists of five components: RAM, CPU, storage devices, I/O devices, and communication devices. There are three levels of programming languages: machine, assembly, and high-level. Java is one of the newest high-level programming language in use today. In this course, you will learn how to program in Java.

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

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.1 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 called an instance of a class.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Fig. 1.1 A graphical representation of an object.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Fig. 1.2 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. Fig. 1.3 A graphical representation of a class.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.2 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.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.2 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. Fig. 1.4 One-way communication: Sending the message walk to a Robot object.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Fig. 1.5 Two-way communication: The result distance is returned to the sender of the message.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Fig. 1.6 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. 1.3 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. 1.3 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. Fig. 1.7 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. Fig. 1.8 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. Fig. 1.9 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. Fig An example of inefficient program design: Three Account objects duplicating information (minimum balance = $100) in instance data values.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Fig 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. 1.4 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.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.4 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. 1.4 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.

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

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Fig An example of inheritance hierarchy among different types of students.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.5 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. 1.5 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. 1.5 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. 1.5 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. 1.5 Software Life Cycle Coding phase: Implement the detailed design into an actual program.

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

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. More on UML – Unified Modeling Language We will look at a few useful UML diagrams: Use Case Diagrams Static Diagrams: Class Diagrams Object Diagrams Interaction Diagrams: Sequence Diagrams Activity Diagrams We already had some elements of UML introduced in the preceding viewgraphs. Now, we will analyze more details. We will practice the use of the diagrams during the lab. For more details see: UML.html