Q. No.(3.1) Prepare a class diagram from the instance diagram in the figure below:

Answer :

Class Name  :  Country

Attribute names:    (1) country Name

                                  (2) Population

                                  (3) Major Language

                                  (4) capital city

                                  (5) Per capita Income

  Member function :  Make border with( )

  Association name : borders with

  One country can have border with zero or more  Countries


Q No.  (3.6)   Prepare a class diagram from the instance diagram given below

Answer:

 

    Class name:          Person

   attribute name:            (1) person's name   (2) age    (3) height    (4) weight   (5) sex

  member function(method) :         make_relation_with( )

  Association name :         related to

One person can have different types of relation with different person in a family


Q No. (3.7)  Prepare a class diagram from the instance diagram of a geometrical document given below, prepare the class diagram using aggregation and generalization

Answer:


Q. No.(3.9,  3.11, 3.12)    Given a partially completed object diagram of an air transportation system. Multiplicity ball have been left out. Add them to the diagram. . Demonstrate how multiplicity decisions depend on your perception of world.

      also       (i) Add association names to the unlabeled association in the diagram

                    (ii) Add role names to the unlabeled associations

Answer:


Q. No. (3.15)   Prepare object diagram showing at least 10 relationships among the following object classes. Include associations , aggregations and generalizations.   Use qualified association and show multiplicity balls in your diagrams.  You need not to show the attribute or operations. Use association name where needed.

  (a) school, playground, principal, school board, class room, book, student, teacher, cafeteria, rest room, computer, desk, chair, ruler, door, swing.

Answer:

(b) castle, moat, drawbridge, tower, ghost, stairs, dungeon, floor, corridor, room, window, stone, lord, lady

Answer:

(c) expression, constant, variable, function, argument list, relational operator, term, factor, arithmetic operator, statement, program.

Answer:

(d) file system, file, directory, file name, ASCII file, executable file, directory file, disk, drive, track, sector.

Answer:

Description:    Partition and Identification are the association name.

Q. No. (3.18):  Given a figure below which represent an object diagram for a computer system for laying out a newspaper. The system handles several pages which may contain among other things, columns of text. The user may edit the length and width of column text, moves it around on a page or move it to other page. Modify the object diagram to handle this enhancement.

Answer:

User can manipulate ( manipulate is the name of  the association) in three ways cut, copy and paste .

Q. No. (3.19) :  Given an object diagram that might be used in designing a system to simplify the scheduling and scoring of judged athletic competitions such as gymnastics, diving, and figure skating. There are several events and competitors. Each competitor may enter several events and each event has many competitors. Each event has several judges who subjectively rate the performances of  competitors in the event. A judge rate every competitor for an event. In some cases, a judge may score more than one event. The focal points of competitors are trials. Each trial is an attempt by one competitor to turn in the best performance possible in one event. A trial is scored by the panel of judges for an event and  a net score is determined. Add role names and multiplicity balls to the association.

Answer: