Composition like inheritance demonstrates what software


1.The constructor of a derived class

1 cannot specify a call to the constructor of a base class in the body of the constructor function definition.

2 can specify a call to the constructor of a base class but only when the access specifier for the class set protected.

3 can specify a call to the constructor of a base class in the body of the function definition.

4 can specify a call to the constructor of a base class in the body of the constructor function definition.

2.Given a pointer variable called myData which points to an instance of the following structure, which of the following statements assigns the value 123.45 to the dval field of the structure? struct Data { int ival; double dval; char cval; };

1 dval = 123.45;

2 *mydata = 123.45;

3 mydata->dval = 123.45;

4 mydata.dval = 123.45;

3.What is the data type of pDist? Distance * pDist;

1 Distance

2 Const pointer to Distance

3 Pointer to Distance

4 Pointer to MAX

4.If p is a pointer, which statement uses the pointer, then increments it?

1 *++p

2 *p++

3 *p--

4 *--p

5.Composition, like inheritance, demonstrates what software development advantage of object-oriented programming?

A Better coordination between software developers

B Reduced development time

C Reusable code

D All of the above

Request for Solution File

Ask an Expert for Answer!!
Civil Engineering: Composition like inheritance demonstrates what software
Reference No:- TGS0816025

Expected delivery within 24 Hours