Answered step by step
Verified Expert Solution
Link Copied!

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: } 

a-03

b-05

c-06

d-07

e-08

f-09

g-10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

Find [a]-1 in Z1009 for (a) a = 17, (b) a = 100, and (c) a = 111

Answered: 1 week ago

Question

5. Have you stressed the topics relevance to your audience?

Answered: 1 week ago