Introduction To OOP (2) - COP 3330: Object-Oriented...

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

View Full Document Right Arrow Icon
COP 3330: Introduction – Part 2 Page 1 © Dr. Mark Llewellyn COP 3330: Object-Oriented Programming Summer 2011 Introduction to Object-Oriented Programming – Part 2 Department of Electrical Engineering and Computer Science Computer Science Division University of Central Florida Instructor : Dr. Mark Llewellyn markl@cs.ucf.edu HEC 236, 407-823-2790 http://www.cs.ucf.edu/courses/cop3330/sum2011
Background image of page 1

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

View Full DocumentRight Arrow Icon
COP 3330: Introduction – Part 2 Page 2 © Dr. Mark Llewellyn Fundamentals of Object Orientation In non-object-oriented programming, a program is usually process-oriented or data-oriented. In such programs, there are typically data globally available and procedures globally available. The main program, or its subprograms, are in control and manipulate the data. That is, each part of the program goes to the global data, gets part of it, manipulates it, and then, if necessary, saves any changes to the data. One can think of the main program, through its subprograms as having all the “intelligence” or behavior in the program and the data has none of the intelligence. In this case, the main program and its subprograms are responsible for everything.
Background image of page 2
COP 3330: Introduction – Part 2 Page 3 © Dr. Mark Llewellyn Fundamentals of Object Orientation In object-oriented programming, a program is partitioned into a set of communicating objects. Each object encapsulates all the behavior and knowledge relating to one concept. In this fashion, one can think of an OO program as having distributed control in that the “intelligence” (the ability to do things) and the “knowledge” (the data to be able to do those things), is distributed among the objects. When an object needs something from another object, it sends a message to the other object, which then performs some action and possibly returns a value to the caller. The first object might even create the second object is no such object already exists. The second object, in turn, may need to communicate with other objects to help it accomplish its task.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Introduction – Part 2 Page 4 © Dr. Mark Llewellyn Fundamentals of Object Orientation To start an OO program executing, you typically create a few objects and start them communicating with each other. In particular, this situation occurs when an object- oriented GUI (graphical user interface) is used as the HCI (human computer interface) in an application. The windows, menus, and buttons are objects that need to be created first, and then those objects typically just sit there waiting for the user to interact with them, in which case they send messages to each other (and probably to other invisible objects) to accomplish the task. GUI-based programming falls under the paradigm of event-
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 44

Introduction To OOP (2) - COP 3330: Object-Oriented...

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

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