Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following class definitions.class Employee { };class Boss : public

ID: 3645861 • Letter: C

Question

Consider the following class definitions.class Employee { };class Boss : public Employee { };class Worker : public Employee { };Which class(es) should declare the function as virtual if all three classes have a member function double CalculateEarnings();? (Points : 4) class Boss class Worker class Employee All three classes 15. (TCO 7) Virtual functions are reserved using what C++ keyword? (Points : 4) Polymorphic Static Dynamic Virtual 16. (TCO 7) Any child class function with the same name and argument list as the parent class does what to the parent function? (Points : 4) Overloads Specializes Generalizes Overides 17. (TCO 8) What is the general syntax of the namespace definition statement? (Points : 4) namespace namespace_name { members } using namespace namespace_name using namespace namespace_name;

Explanation / Answer

1.class Employee{}. 2.we can over write virtual functions direcly.in the base class we should use virtual key word before the funcion name(i.e., virtual ret_type fun_name()) 3.child function overwrites the parent function 4.>What is the use of using namespace std; ? Namespaces are like drawers in a filing cabinet. All of the standard library is in one drawer, and the only way to get to the stuff in that drawer is to tell C++ where to find it. You do that by prefixing the name with std: #include int main() { std::cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote