FullLecturenote

FullLecturenote - Chapter 1 Object-Oriented Programming...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Chapter 1 Object-Oriented Programming § Object-Oriented Programming and Procedural Programming § Concepts of Object-Oriented Programming (OOP) object class inheritance encapsulation polymorphism § The Java programming language
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Object-Oriented Programming (OOP) and Procedural Programming Procedural Programming Separates the data of the program from the operations that manipulate the data. OOP Programmers define not only the data type of a data structure (array, records, tree, etc.), but also the types of operations (functions) that can be applied to the data structure. In this way, the data structure becomes an object that includes both data and functions. Programmers can create relationships between one object and another. For example, objects can inherit characteristics from other objects. Advantage of OOP over procedural programming Programmers do not need to change the existing programs when a new type of object is added. A programmer can simply create a new object that inherits many of its features from existing objects. This makes object-oriented programs easier to modify.
Background image of page 2
3 Software Development Cycle Requirement: decide what the project is supposed to accomplish, the output is a requirement document. Maintenance: copes with newly discovered problems or new requirements can take far more time than the initial development of the software. It may be necessary to add code that does not fit the original design to correct an unforeseen problem or it may be that a customer is requesting more functionality and code can be added to accommodate their requests.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Concepts of Object-Oriented Programming What is an Object? Real World Objects have two characteristics: State and Behavior Real world Objects State Behavior Dog Name Color Hungry Barking Fetching Wagging tail Bicycle Current gear Current pedal cadence Two wheels Speed Braking Accelerating
Background image of page 4
5 Software Objects have two characteristics like real world objects: 1 Variables: current state of the object Software object bicycle: contain the state for a particular
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 24

FullLecturenote - Chapter 1 Object-Oriented Programming...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online