click below
click below
Normal Size Small Size show me how
Object-Oriented Prog
Key Terms Related to Object-Oriented Programming
Term | Definition |
---|---|
Object | Objects are self contained data structures that consist of properties,methods specify and object's behavior and events provide communication between objects. |
Encapsulation | Encapsulation is a mechanism to restrict access to a class or class members in order to hide design decisions that are likely to change. |
Class | A class is the template from which individual objects are created. |
Access Modifier | An access modifier specifies what region of the code will have access to a field. For example, the access modifier public will not limit access, but the access modifier private will limit access within the class in which the field is defined. |
Method | A method is a block of code containing a series of statements. |
Method Signature | Specifies whether the code is public, private, internal ,etc |
Constructors | Constructors are special class methods that are executed when a new instance of a class is created. Constructors are used to initialize the data members of the object. |
Properties | Properties are class members that can be accessed like ata fields but contain code like a method. |
Accessors | Accesses information to provide an output |
Value Type | Directly stores data within its memory. |
Reference Type | Reference types only store a reference to a memory location. The actual data is stored at the memory location being referred to. |
Structure | Do not support inheritance. |
Inheritance | Inheritance is an OOP feature that allows you to develop a class once, and then reuse that code over and over as the basis of new classes. |
Abstract Classes | Provide a common definition of a base class that can be shared by multiple derived classes. |
Sealed Classes | Provide complete functionality but cannot be used as base classes. |
Polymorphism | Polymorphism is the ability of derived classes to share common functionality with base classes but still define their own unique behavior. |
Override Keyword | The override keyword replaces a base class member in a derived class. |
Interfaces | Interfaces are used to establish contracts through which objects can interact with each other without knowing the implementation details. An interface definition cannot consist of any data fields or any implementation details such as method bodies. |
Base Classes | The class whose functionality is inherited is called a base class. |
Derived Classes | The class that inherits the functionality is called a derived class. |