A) Which keywords indicate interface scope of the data and methods in a class de
ID: 3694380 • Letter: A
Question
A)
Which keywords indicate interface scope of the data and methods in a class declaration (like in a header file)?
B)
According to the text (and me), which of the following goes into a header file when you write a class?
void
C) A _____________________ ( 1 word) is called when you declare a variable (object) of a class's type.
D) How many bytes of memory is set aside/reserved by the following class declaration? (enter a number, 0-1000)
C)
When writing classes, :: is a scope operator that you use to designate which class a function/method belong to.
False
H)
You have to #include a particular class's header file in which of the following files? (pick 3)
the class's cpp file
F)
A constructor that takes no parameters is called a ____________ constructor. (1 word)
H)
For a class, data is usually declared _________________.
int
G)
Each and every class in a C++ program (by convention) are (should be) defined in how many files?
In other words, if you have a project and add a new class for it, how many files will you have to add?
Use a number, not words!!!
classExplanation / Answer
A)
The keywords which indicate interface scope of the data and methods in a class declaration (like in a header file) are private and public.
B)
According to the text (and me), the following goes into a header file when you write a class:
C)
A constructor is called when you declare a variable of a class type.
D)
Total 12 bytes of memory are reserved by the following class declaration:
int hrs; //4 bytes reserved
int mins // 4 bytes reserved
int secs // 4 bytes reserved
So, total 12 bytes are reserved.
C)
It is TRUE that when writing classes, :: is a scope operator that you use to designate which class a
function/method belong to.
E)You must #include a class’s header file in the following files:
F)
The constructor that takes no parameters is called a Default constructor.
H)
For a class, data is usually declared private.
G)
Each and every class in a C++ program are defined in 3 files
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.