Chapter 1 Introduction to Object-oriented Programming and Software Development Introduction to Object-Oriented Programming 2000 McGraw-Hl‖ Java--Wu Chapter 1-1
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 1 Chapter 1 Introduction to Object-oriented Programming and Software Development
Chapter 1 objectives After you have read and studied this chapter, you should be able to e Name the basic components of object-oriented programming e Differentiate classes and objects e Differentiate class and instance methods e Differentiate class and instance data values e Draw object diagrams using icons for classes objects and other components of object-oriented programming e Describe the significance of inheritance in object-oriented programs. Name and explain the stages of the software life cycle C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1-2
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 2 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. Draw object 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
Classes and objects r Object-oriented programs use objects r An object is a thing both tangible and intangible Account, Vehicle, Employee, eto r 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. r An object is called an instance of a class C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1-3
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 3 Classes and Objects Object-oriented programs use objects. An object is a thing, both tangible and intangible. Account, Vehicle, Employee, etc. 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
Graphical Representation of an object The objects name appears on top of the sV129 Icon Account An icon for an object is The class name is the rounded rectangle placed inside the object icon customer1 The class name may be omitted when it is clear from the context which class the object belongs to C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 1-4
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 4 Graphical Representation of an Object Account SV129 The class name is placed inside the object icon. The object’s name appears on top of the icon. An icon for an object is the rounded rectangle. The class name may be omitted when it is clear from the context which class the object belongs to. customer1
Graphical Representation of a Class The class name appears on top of the Account Icon An icon for a class is the tangle C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 1-5
© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 1 - 5 Graphical Representation of a Class Account The class name appears on top of the icon. An icon for a class is the rectangle