Comp Sci II Midterm

14 flashcardsby Eucalyptus
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
Passing by reference using &,
Allows you to change the value of the argument
2
What is the syntax to overload operators such as --, ++, etc?
Object Object::operator--(int)
3
How do you access a static member of an object?
::
4
How do you access a non-static member of an object?
Period
5
What is a pointer?
A variable that holds the address of another variable
6
What is a struct?
A collection of variables. These variables can be of different types, unlike arrays.
7
Declare a struct
struct {
int num;
string str;
} structName;
8
How do you access a member of a structure?
structName.varName
9
What is the difference between a private and public member of a class?
Private members can only be accessed or viewed from inside the class, public members can be accessed outside the class
10
What is the difference between a struct and a class?
A struct has no methods
11
Mutator
Can change the value of one or more data members. Setter, or set, functions are mutators, but it is NOT the case that all mutators are set functions. In the Date class, all the set functions are mutators, but increment() is a mutator as well.
12
Facilitator
Provides a result based upon the value of one or more data members. Facilitators figure something out. In the Date class, leapYear() is one facilitator.
13
Inspector
Sometimes referred to as an accessor function, an inspector merely furnishes the value of one or more data members. Get (or getter) functions are inspectors. In the Date class, getDate() is not a classic get function, as it furnishes multiple data members’ values, but it is certainly an inspector.
14
What does the & operator provide when used?
The address to the variable it is used on
Study all 14 cards for free

More Computer science flashcards

CS 3345 Exam 144 cardsComputer science · EnglishKevinNetwork Security38 cardsComputer science · EnglishAli_vxxx1.2.1 System software 32 cardsComputer science · EnglishSabs2023Servlets26 cardsComputer science · GermanInasecurity +21 cardsComputer science · EnglishKComputer Hardware and Types15 cardsComputer science · EnglishAyaanArgc Argv10 cardsComputer science · EnglishJohnNetwork Routing206 cardsComputer science · EnglishManethelComputer Architecture Exam 1117 cardsComputer science · EnglishCarterAssembly Language and 8086 Registers Midterm84 cardsComputer science · EnglishDiandreiCybersecurity: Contingency Planning and Incident Response69 cardsComputer science · EnglishAndrewCNIT242 Exam 357 cardsComputer science · EnglishAyden

All Computer science decks

Study these decks in the app

Free on iPhone, Android, Mac and the web. Add any deck to your account in one tap.

Download on the App StoreGet it on Google Play
Study all 14 cards for free