2. You are defining A class for use in a program you are writing. Which of the >>>>ADD: “a” lowwercse following should b
Posted: Fri Apr 29, 2022 6:50 am
2. You are defining A class for use in a program you are
writing. Which of the >>>>ADD: “a” lowwercse
following should be placed in the interface file for your class?
Which should be placed in the implementation file for your
class?
a) The class definition.
b) The declaration of a stand-alone function (neither member nor
friend of the class) that uses this class type parameter, and is
used as a class operation.
c) The declaration of a stand-alone overloaded operator (neither
member nor friend of the class) that is to serve as a class
operation.
d) The definition of a stand-alone function (neither member nor
friend of the class) that uses this class type parameter, and is to
serve as a class operation.
e) The definition of a friend function that is to serve as a
class operation.
f) The definition of a member function.
g) The definition of a stand-alone overloaded operator (neither
member nor friend of the class) that is to serve as a class
operation.
h) The definition of an overloaded operator that is to serve as
a class operation and is a friend of the class.
i) The main function of your program.
3. Here is a list of file names with extensions. Pick at least
one that could properly be the implementation file and at least one
that can properly serve as interface file.
a) File.cxx
b) File.hxx
c) File.cc
d) File.h
e) File.cpp
f) File.hpp
4. Of the interface file and the implementation file, which may
be directly compiled?
a) Only the interface?
b) Only the implementation?
c) None of the above?
d) Some of the above? Which?
writing. Which of the >>>>ADD: “a” lowwercse
following should be placed in the interface file for your class?
Which should be placed in the implementation file for your
class?
a) The class definition.
b) The declaration of a stand-alone function (neither member nor
friend of the class) that uses this class type parameter, and is
used as a class operation.
c) The declaration of a stand-alone overloaded operator (neither
member nor friend of the class) that is to serve as a class
operation.
d) The definition of a stand-alone function (neither member nor
friend of the class) that uses this class type parameter, and is to
serve as a class operation.
e) The definition of a friend function that is to serve as a
class operation.
f) The definition of a member function.
g) The definition of a stand-alone overloaded operator (neither
member nor friend of the class) that is to serve as a class
operation.
h) The definition of an overloaded operator that is to serve as
a class operation and is a friend of the class.
i) The main function of your program.
3. Here is a list of file names with extensions. Pick at least
one that could properly be the implementation file and at least one
that can properly serve as interface file.
a) File.cxx
b) File.hxx
c) File.cc
d) File.h
e) File.cpp
f) File.hpp
4. Of the interface file and the implementation file, which may
be directly compiled?
a) Only the interface?
b) Only the implementation?
c) None of the above?
d) Some of the above? Which?