Download presentation
Presentation is loading. Please wait.
Published byAnthony Bishop Modified over 8 years ago
1
Computer science Object-Oriented Programming
2
Overview There are several words that are important: class object instance field property method event
3
Class and object “You must define a class before you can create an object” Class is a blueprint, from which you can create objects. It defines a characteristic of an object, such as the data that the object contain and the operations that the object can perform. Object is an instance of a class. If a class is a blueprint of an object, an object is what is created from that blueprint.
4
Instance and Field “instance” – often used as an alternative to object. Field is a class member that represents a piece of data that the class needs to fulfill its design. Typically defined as private members in a class, to prevent the fields from being accessed directly from outside the class.
5
Property, method and event Property is a flexible mechanism to read write or compute the values of a field. Method comprise a code block and represents an action that object or class can perform. Event indicates something has happened to an object or class. Event provide a notification mechanism that enables observes in the application to respond to event ad perform appropriate event-handling operations.
6
About Some of the definitions are from a course 499A by Microsoft Learning. Copyright (C) Microsoft This presentation is made by Artem Los artem@artemlos.net
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.