Q.No.1. A) When would private and protected class members be used in an object-oriented program? Clearly distinguish between them. B) How are private and protected class members represented in a UML class diagram? Give an example class definition in UML that contains a field of each type.
Q.No.1.
A) When would private and protected class members be used in an object-oriented program? Clearly distinguish between them.
B) How are private and protected class members represented in a UML class diagram? Give an example class definition in UML that contains a field of each type.
Q.No.2.
A) Describe how is-a and has-a inter-class relationships may be implemented in object-oriented
B) Explain the difference between the object-oriented design concepts of generalization and specialization and describe how these relate to the inheritance feature in object-oriented programming languages.
Q.No.3.
A) Describe TWO features of object-oriented programming languages that promote code reuse.
B) Name THREE different types of polymorphism commonly available in object-oriented programming languages, give code examples to support your answer.
Step by step
Solved in 2 steps