Week 7 Flashcards
is a way of writing code where we group related data and actions together into objects.
OOP (Object-Oriented Programming)
are the things you think about first in designing a program and they are also the units of code that are eventually derived from the process.
Objects
is an instance of a class. It represents a real-world entity with attributes (data members) and behaviors (member functions).
Objects
It is created from a class.
Objects
is an object-oriented programming language.
C++
are basically variables and functions that belongs to the class.
Attributes and Methods
These are often referred to as “class members”.
Attributes and Methods
Only the specification for the object is defined; no memory or storage is allocated. To use the data and access functions defined in the class, you need to create objects.
Attributes and Methods
is a user-defined data type that we can use in our program, and it works as an object constructor, or a “blueprint” for creating objects.
class
is a user-defined data type, which holds its own data members and member functions, which can be accessed and used by creating an instance of that class. A C++ class is like a blueprint for an object.
Class
When it is defined, only the specification for the object is defined; no memory or storage is allocated. To use the data and access functions defined in the class, you need to create objects.
Class
Information an object has (e.g., a car’s color or speed).
Data (Attributes)
Actions an object can do (e.g., a car can start or stop). This makes programs organized, reusable, and easier to manage because everything related is kept together.
Behavior (Methods)
are the data variables and member functions are the functions used to manipulate these variables together, these data members and member functions define the properties and behaviour of the objects in a Class.
Data Members
is a special method that is automatically called when an object of a class is created.
Constructor
is also a special member function like a constructor. -_________ destroys the class object created by constructors.
Destructor
is the last function that is going to be called before an object is destroyed. It is used to free resources like memory, close files, or clean up when an object is no longer needed.
Destructor
Functions are defined directly inside the class.
Inside Class
Treated as inline
by default, improving performance for small functions.
Inside Class
Good for small, simple functions.
Inside Class
Functions are declared inside the class but defined outside** using ::
.
Outside Class
Keeps the class clean and organized, especially for large functions.
Outside Class
Preferred for complex or long functions.
Outside Class
The public keyword is an ________
Access Specifiers