Answer to Question #319979 in C++ for Yaku

Question #319979

Consider the following program on the link;

https://drive.google.com/file/d/1EELCBZ58M-uxdMDZR8faLLQ45h9jLArE/view?usp=sharing


Now, consider the derived class interface, aTriplet, defined as


template <template T1, class T2, class T3>

class aTriplet : public aPair <T1, T2>

{

private:

T3 obj3; // The 3rd component of the triplet. obj1 and obj2 are inherited from aPair


public: // The get and set data functions


T3 get_obj3(); /* Returns obj3 to any calling environment*/


void set_obj3(T3 value); /* Sets the value of obj3 to value */

// The constructor -- polymorphic


aTriplet(T1 value1 = 0, T2 value2 = 0, T3 value3 = 0);

// It constructs a triple as three components: (value1, value2, value3).


~aTriplet() {} void input(); // It allows the user to enter the three components,


void display();

};


Now, write a complete C++ class implementation of the following constructor and member functions:

a) aTriplet(T1 value1 = 0, T2 value2 = 0, T3 value3 = 0);

b) void input();

c) void display();


0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog