Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problems 12-16 are based upon the following class declaration appearing in unknown.h All member functions will be defined in the file unknown.cpp class Unknown private:

image text in transcribed

Problems 12-16 are based upon the following class declaration appearing in unknown.h All member functions will be defined in the file unknown.cpp class Unknown private: int a; public: Unknown (); // Initializes a to o void setA (const int aa); // Sets a equal to aa void GetA (int& aa) const; // Sends value of a to client through aa }; 12. Which of the following is a valid implementation for SetA ? A) void SetA(int aa) const B) void Unknown::SetA(aa) const C) void Unknown:: SetA() aa = a; a = aa; aa = a; D) void Unknown::SetA(const int aa) E) None of the answers provided a = aa; 13. Which of the following is a valid function heading for the function Unknown ? A) void Unknown(); D) int Unknown::Unknown() B) void Unknown::Unknown() E) None of the answers provided C) Unknown() 14. Which of the following is a valid function heading for the function GetA ? A) int Unknown::GetA(int& aa) D) int Unknown::GetA(int& aa) const B) void GetA(int& aa) E) None of the answers provided C) void Unknown::GetA(int& aa) const 15. Suppose that a client program has a variable X of type Unknown. Which of the following statements correctly outputs the current value of the private member a of the variable X? A) cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions