Question: Question 2 [ 1 8 | 2 . 1 . The intention is to use reflective programming approaches. Write the class definition of the main

Question 2
[18|
2.1. The intention is to use reflective programming approaches.
Write the class definition of the main container class so that reflective programming approaches can be used. It should be possible to create such container objects using a code that has already been provided; however, a default code (D999D) should be used if no code is provided when the object is instantiated.
2.2. The client wants to be able to add a comment to some of the container objects but does not what this to be available as a general requirement for all container objects. Is it possible to add a comment like "Fragile" to a container object named container? If so, explain why and provide the code to do so; if not, explain in detail why not. Note that there are no marks allocated for answering yes or no.
23. The following code is to be used to get property data from a container object.
1 QDombocument d;
2 Container *c = new Container0; // assume a valid container
3 soner QMetuObject "m=c metaObject 0 ;
4 ODamiliement basetag = d.createElement("container");
S. for (int in-1; Feme-propertyCount); it +)
61
QMeluPropenty peop * m-P property(i);
QSirity pogertyNlans - prop name();
 Question 2 [18| 2.1. The intention is to use reflective programming

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!