Private members

Consider the following statements: (1, 2, 3, 5, 7)

class temporary public:    void set(string, double, double);

    void print();

    double manipulate();

    void get(string&, double&, double&);

    void setDescription(string);

    void setFirst(double);

    void setSecond(double);

     string getDescription() const;

    double getFirst() const;

    double getSecond() const;

    temporary(string = “”, double = 0.0, double = 0.0);

private:    string description;

    double first;

    double second; ;

a. How many members does class temporary have?

b. How many private members does class temporary have?

c. How many constructors does class temporary have? Can this constructor be used to initialize an object without specifying any parameters? If yes, then illustrate with an example; otherwise explain why it cannot be used to initialize an object without specifying any parameters.

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X