Question: Please provide explanation for each part. Thank You. Part A) Select any answers that apply. Which of the statements are true about the class MailingList?
Please provide explanation for each part. Thank You.
Part A) Select any answers that apply.
Which of the statements are true about the class MailingList?
01: class MailingList { 02: public: 04: void add (Contact s); 05: int numContacts() const; 06: Contact& getContact (int i) const; 07: private: 08: Contact* array; 09: int numberOfContacts; 10: }; | a-It is legal to assign one MailingList variable to another. | |||||||||||||||||||||||
| b-It has no default constructor | |||||||||||||||||||||||
| c-It violates the Rule of the Big 3. | |||||||||||||||||||||||
| d- | It has no copy constructor | ||||||||||||||||||||||
| e-Shallow copy is appropriate
Part B) Select any answers that apply. In the code below, which lines include uses of operator= ? 01: int strangeStuff (string q); 02: 03: string oddStuff (const string& s) 04: { 05: int k; 06: string t (s); 07: string w = s + 'a'; 08: t = w + 'b'; 09: int m = strangeStuff (t); 10: return t.substr(m); 11: }
|
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
