Practical 16 : Categorize the following relationships into generalization, aggregation or association.

[A] A country has a capital city
Solution:



[B] A dining philosopher uses a fork
Solution:



[C] A file is an ordinary file or a directory file
Solution:                     

                               

[D] Files contains records
Solution:


[E] A polygon is composed of an ordered set of points
Solution:


[F] A drawing object is text, a geometrical object, or a group
Solution:


[G] A person uses a computer language on a object
Solution:


[H] Modems and keyboards are input/output devices
Solution:


[I] Classes may have several attributes
Solution:







[J] A person plays for a team in a certain year
Solution:


[K] A route connects two cities
Solution:


[L] A student takes a course from a professor
Solution:


Comments

Popular posts from this blog

Practical 12: Refine the student manager program to manipulate the student information from files by using the BufferedReader and BufferedWriter

Practical 9 : Write an interactive program to print a string entered in a pyramid form. For instance, the string “stream” has to be displayed as follows: