Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

all in c++ A C++ stl vector (check all that apply) ... A. ... is a type of pre-defined (in stl) template class. B. ...

all in c++

A C++ stl vector (check all that apply) ...

A.

... is a type of pre-defined (in stl) template class.

B.

... is a type of container.

C.

...can be accessed using notation practically identical to (or identical to) a simple array.

D.

... is a type of constructor.

Consider a derived class B that is multiply inherited from base classes A1 and A2. Which would be a reasonable example of classes A1, A2 and B. (There may be more than one correct answer.)

A1 is an Insect (animal without a backbone, body in three sections, skeleton on the outside, usually give birth as eggs) A2 is a Mammal (animal with backbone, has hair/fur, usually give birth alive) B is an Animal (any living being on Earth which is neither a plant (vegetable) nor fungus)

A1 is a RealEstateProperty A2 is an ItemForSale B is a RealEstatePropertyForSale

A1 is a Condominium (One unit in a condo development in which a family might own and reside) A2 is a SingleFamilyDwelling (One house+land in which a family might own and reside) B is a ResidentialProperty (House+land, condo unit, townhome, or any other place in which a family might own and reside)

A1 is an Arm A2 is a Leg B is a HumanBody

A1 is a person who has some degree in math: DegreeHolderInMath A2 is a person who has some degree in computer science: DegreeHolderInCS B is DegreeHolderInBothMathAndComputerScience

A class MyClass is instantiated by some client main() dynamically, using some MyClass pointers local to main(). Check all that apply.

It is possible that MyClass does not need any of the following: a user defined destructor, copy constructor or assignment operator.

main()is responsible for deleting the two objects it instantiated, either directly or by calling some method that deletes them

It is MyClass's instance methods that are responsible for deleting the two objects instantiated by main()

If no deep memory is used in MyClass (i.e., it contains only simple data, no pointer members), then main()does not need to manually delete the objects that it dynamically allocates.

The situation described means that MyClass will always need a user defined destructor, copy constructor and assignment operator.

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions