Midterm Review Flashcards

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
Q

Iomanip & How to Format Output

A

Provides facilities for manipulating the format of input and output streams

26
Q

Class Declaration vs. Class Definition

A

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
Q

. operator

A

Used to access members (attributes and methods) of an object or structure

28
Q

: operator

A

Used in class definitions to specify the base class and initialize it in the constructor of a derived class.

29
Q

:: operator

A

Used to define the scope of a class, namespace, or enumeration

30
Q

&laquo_space;operator

A

Insertion operator (cout)

31
Q

> > operator

A

Extraction operator (cin)

32
Q

~ operator

A

Destructor operator

33
Q

?: operator

A

Ternary Conditional Operator

34
Q

, operator

A

Separator

35
Q

sizeof operator

A

Used to determine the size (in bytes) of a data type or an object

36
Q

-> operator

A

Used to access members of a class or structure through a pointer

37
Q

& operator

A

Address

38
Q

(type) operator

A

Type cast operator. It is used to convert a value from one type to another explicitly

39
Q
  • operator
A

Dereferences a pointer

40
Q

What is the difference between syntax and semantics?

A

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
Q

Source Code vs. Object Code

A

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
Q

What is the role of the compiler?

A

Converts into machine code

43
Q

What is the role of the linker?

A

Combines various pieces of compiled code into a single executable program