Justify the validity of the following statements with proper and logical arguments.. a. Class definition and class implementation files are the same. b. Private members of the class can be directly accessed in the main( ) of the class. c. Functions cannot be written in the public section of the class. d. In accessor functions, value of any variable of the class cannot be changed. e. Namespace is a logical area, defining the scope of variables and functions. In a same program, more than one namespace is not allowed. f. Constructor functions are always declared as the mutator functions. g. Scope resolution operator is used while declaring the functions in the class interface. h. A class must have a get_data( ) and print( ) function. i. It is mandatory that the return type of the print( ) function in the class will always be void. j. getline( ) function can read a sequence of numbers declared as int.(do this in C++ programming)
Q1. Justify the validity of the following statements with proper and logical arguments..
a. Class definition and class implementation files are the same.
b. Private members of the class can be directly accessed in the main( ) of the class.
c. Functions cannot be written in the public section of the class.
d. In accessor functions, value of any variable of the class cannot be changed.
e. Namespace is a logical area, defining the scope of variables and functions. In a same
program, more than one namespace is not allowed.
f. Constructor functions are always declared as the mutator functions.
g. Scope resolution operator is used while declaring the functions in the class interface.
h. A class must have a get_data( ) and print( ) function.
i. It is mandatory that the return type of the print( ) function in the class will always be
void.
j. getline( ) function can read a sequence of numbers declared as int.(do this in C++
Step by step
Solved in 4 steps with 3 images