What are parameterized classes in UML?

Questions by nancyphilips   answers by nancyphilips

Showing Answers 1 - 1 of 1 Answers

Dusan B

  • Nov 2nd, 2007

Some object-oriented languages such as C++ and Ada support the concept of parametrized classes. C++ calls this facility “templates”, and Ada calls it “generics”; UML uses the C++ term.
New versions of Java support this feature as well. So as an example, suppose you have a collection, and you can only have Persons as part of this collection. In UML, parametrize classes is saying only objects of that parameter can belong to this collection. In C++ this is done using templates, but in Java since java 5 you can say Linked List and this would only allow Person to be assigned to the collection.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions