Midterm Review Flashcards

(43 cards)

1
Q

What is OOP?

A

Object-Oriented Programming - organizes software design around objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is abstraction?

A

Hiding the complex processes behind the program and only exposing what is necessary for the functionality of the user (ex. gas pedal in a car)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define a class

A

A blueprint for creating objects (defines a set of data and functions)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define an object

A

Is an instance of a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define instantiation

A

The process of creating an actual instance (or object) from a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is ADT?

A

Abstract Data Type - hides the internal details of the data structure and only provides the essential operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Member functions

A

Functions that are defined within a class and operate on the data of objects created in that class (AKA methods)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Member variables

A

Variables define within a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Method

A

A function that is defined with a class and operates on the objects of that class (AKA member function)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Access Specifiers

A

Control the visibility and accessibility of class members

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Global

A

Variable that are defined outside of all functions and have a global scope

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Inline

A

A small function that you tell the compiler to try to insert directly into the places where it’s called (instead of making a regular function call)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Constructor

A

A special member function that is automatically called when an object of a class is created

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Destructor

A

A special member function that is automatically called when an object of a class is destroyed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Static

A

Something that is fixed or unchanging

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Default Constructor

A

Initializes an object with no arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Default Parameter

A

A value that is automatically assigned to a function parameter if no argument is provided

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Constructor Delegration

A

Allows for one constructor to call another constructor in the same class

19
Q

Accessor Method

A

A member function in a class that retrieves the value (AKA getter)

20
Q

Preprocessor Directive

A

A command that is processed by the preprocessor before the actual compilation of the code begins

21
Q

Iostream Header File

A

Part of the standard library and provides functionality for input and output operations

22
Q

Cin

A

Input for c++

23
Q

Cout

A

Output for c++

24
Q

Named Constants

A

Variables whose values are set at compile time and CANNOT be changed

25
Iomanip & How to Format Output
Provides facilities for manipulating the format of input and output streams
26
Class Declaration vs. Class Definition
A class declaration introduces the class name and its members. A class definition provides the complete details of the class, including the implementation of its member functions and the definitions of its member variables.
27
. operator
Used to access members (attributes and methods) of an object or structure
28
: operator
Used in class definitions to specify the base class and initialize it in the constructor of a derived class.
29
:: operator
Used to define the scope of a class, namespace, or enumeration
30
<< operator
Insertion operator (cout)
31
>> operator
Extraction operator (cin)
32
~ operator
Destructor operator
33
?: operator
Ternary Conditional Operator
34
, operator
Separator
35
sizeof operator
Used to determine the size (in bytes) of a data type or an object
36
-> operator
Used to access members of a class or structure through a pointer
37
& operator
Address
38
(type) operator
Type cast operator. It is used to convert a value from one type to another explicitly
39
* operator
Dereferences a pointer
40
What is the difference between syntax and semantics?
Syntax refers to the rules and structure that govern how code is written in a programming language. Semantics refers to the meaning or behavior associated with the syntactically correct statements in a programming language
41
Source Code vs. Object Code
Source code is the human-readable set of instructions written in a programming language (like C++, Python, or Java). Object code is the machine-readable code generated from the source code after it has been compiled or assembled
42
What is the role of the compiler?
Converts into machine code
43
What is the role of the linker?
Combines various pieces of compiled code into a single executable program