OOP 1-3

0.0(0)
studied byStudied by 1 person
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

25 Terms

1
New cards
2
New cards
3
New cards
4
New cards
5
New cards

Object-Oriented Programming (OOP)

A programming methodology that defines objects whose behaviors and interactions accomplish a given task; models real-world entities using objects.

6
New cards

Procedural Programming

Code divided into procedures and functions; works for small programs but hard to manage in large systems due to separation of data and logic.

7
New cards

Advantages of OOP

Less repetition, better organization, encapsulation, cleaner code, easier updates, scalability.

8
New cards

Class

A blueprint or template defining the structure (attributes) and behavior (methods) of objects.

9
New cards

Object (Instance)

A real entity created from a class; has its own data (state) and behaviors (methods).

10
New cards

State

Current values stored in an object’s attributes; can change during program execution.

11
New cards

Behavior

Actions an object can perform, defined by methods.

12
New cards

Attribute

A characteristic or property of an object; defined as fields/instance variables in a class.

13
New cards

Encapsulation

Bundling data (attributes) and methods into a single unit (class) to keep related logic together.

14
New cards

Inheritance

Reuse of code where a subclass acquires properties and methods of a superclass.

15
New cards

Polymorphism

Ability of different object types to respond to the same method call in different ways.

16
New cards

Constructor

Special method with the same name as the class; used to initialize objects; no return type.

17
New cards

Getter and Setter

Methods to read (get) and update (set) private attributes.

18
New cards

Method Signature

Includes method name and parameter types.

19
New cards

Method Overloading

Defining multiple methods with the same name but different parameter lists.

20
New cards

This keyword

Refers to the current object; used to distinguish instance variables from parameters.

21
New cards

Access modifiers

Control visibility of class members: - public: accessible from anywhere; - private: accessible only within the same class; - protected: accessible within the package and subclasses; - no modifier: accessible only within the package.

22
New cards

Static variable

Class-level variable shared among all instances; one copy only.

23
New cards

Static method

Belongs to the class, can be called without creating an object; can only access static members.

24
New cards

Instance variable

Declared in a class but outside any method; each object has its own copy.

25
New cards

Database analogy in OOP

Classes define structure; objects are like records with unique values in each field.