Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started