C Briefly explain what is bad though syntactically correct a

C++

Briefly explain what is bad, though syntactically correct, about the design of the following code to get input from a user by way of a keyboard. Class CUserInput () {public: CUserInput (); void AcceptUserlnputFromKeyboard(); starting GetUserlnput() const; private: string m_sUser;

Solution

1) The code for getting input to be included.
2) If possible it is recommended to get input from the constructor.
3)No need of extra two functions for same functionality.

C++ Briefly explain what is bad, though syntactically correct, about the design of the following code to get input from a user by way of a keyboard. Class CUser

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site