
Consider the following declarations: class xClass { public: void func(); void print() const; xClass (); xClass (int, double); private: int u; double w; }; xClass x; a. How many members does class xClass have? b. How many private members does class xClass have? c. How many constructors does class xClass have? d. Write the definition of the member function func so that u is set to 10 and w is set to 15.3. e. Write the definition of the member function print that prints the contents of u and w. f. Write the definition of the default constructor of the class xClass so that the private data members are initialized to 0 g. Write a C++ statement that prints the values of the data members of the object x. h. Write a C++ statement that declares an object t of the type xClass, and initializes the data members of t to 20 and 35.0, respectively.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.