Question: 7 3. a) Explain the difference between a vector and a list? Give an example of a situation where a list is more suitable than

 7 3. a) Explain the difference between a vector and a

7 3. a) Explain the difference between a vector and a list? Give an example of a situation where a list is more suitable than a vector in a code. What is the main disadvantage of using a list over a vector? (No code is required). 30 b) From basic datatypes, create a class Sphere and a class Cube, which are used to describe geometrical shapes to be used in a CAD programme. The following code from the main function will be run to test your code. The comment in every line explains the used function or operator, etc. Cube Cubel; // Initialising a cube with side length of 1 Sphere Sph1(5); // Initialising a sphere with radius 5 Cube1.setSide(5); // changes the side length of Cube1 to 5 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!