Virtual University VU Solved Assignments/Quizzes/GDBs, Past Solved Papers/Assignments/Online Quizzes Solutions.

Sunday, November 7, 2010

CS504 Assignment No. 1 Solution

Q1 [Marks 10]
While developing the Virtual University Learning Management System (LMS), there was a requirement stated that: "Students should be able to post their questions on MDB of LMS, so that it may help them to clarify their concepts in case of any confusion, after they have attended the lecture.
To post any MDB, we suppose that student is already logged in on LMS (with already provided student ID and password), now to post question, student will open discussion board and place his/her question there and click the post button, in which case his/her MDB will be posted."
You are required to write the above requirement (of posting MDB) in narrative use case form (also called elaborated form, discussed in lecture 6).
Tips: 1) The components of elaborated use case are: Use case Name Implementation priority Actors Summary Preconditions: Post-condition: Extend Uses Normal course of events Alternative path Exception Assumptions
2) Note that the above components are also discussed in Chapter 3 of handouts (Lecture No. 6).
3) You are required to write the use case in narrative form. Diagrammatic form is not required.
Q2 [10 Marks] Draw the ACTIVITY DIAGRAM of the given scenario: Scenario:
An XYZ university has a well defined library that stores more than 1000 books, from which some are allowed only in library while others can be borrowed by students. The library also has 10 computer terminals (with already installed Library Management System) placed in the library. In order for a student to borrow the book, following mechanism is followed:
Student logins the library management system with already provided login ID and password. After login, student has two options: Either he can enter the book information (he already knows the title, author name, edition etc.) he is looking for or alternatively he may select from interface to view the complete catalog (in sorted form) from which he can select a book. Once he has selected a book from either of the above two options, he may request the system to issue him the said book. System now verifies the book status, issues that book to student and updates the catalog. Along with issuing the book, the system also prints a voucher of the book with student information, book information and other related information. Student signs this voucher and submits to librarian, which hands over the book to student.
..........

What is UML Activity Diagrams

Use an activity diagram (activity diagram: A special case of a statechart diagram in which all of the states are action states and the transitions are triggered by the completion of actions in the source state.) to describe the internal behavior of a method and represent a flow driven by internally generated actions.

In Edraw Professional, the UML Activity Diagrams template and shapes are in the Software folder.
Who can use them and how

* Software developers: Represent software applications using the Unified Modeling Language (UML) notation.
* Software developers: Illustrate and interpret software application relationships, actions, and connections.
* Program managers: Show high-level static software structures in presentations and specification documentation.

UML Activity Diagram Symbols

Edraw is ideal software to draw UML activity diagrams




Examples of UML Activity Diagrams


How to draw UML activity diagrams

1. Identify the scope of the activity diagram


Begin by identifying what it is you are modeling. Is it a single use case? A portion of a use case? A business process that includes several use cases? A single method of a class? Once you identify the scope of your diagram, you should add a label at the top, using a note, indicating an appropriate title for the diagram and a unique identifier for it. You may also want to include the date and even the names of the authors of the diagram.

2. Add start and end points


Every activity diagram has a starting point and an ending point, so you might as well add them right away. In UML Distilled (see Resources), Fowler and Scott make ending points optional. Sometimes an activity is simply a dead end but, if this is the case, then there is no harm in indicating the only transition is to an ending point. This way, when someone else reads your diagram, he or she knows you have considered how to exit these activities.

3. Add activities


If you are modeling a use case, introduce an activity for each major step initiated by an actor (this activity would include the initial step, plus any steps describing the response of the system to the initial step). If you are modeling a high-level business process, introduce an activity for each major process, often a use case or a package of use cases. Finally, if you are modeling a method, then it is common to have an activity for this step in the code.

4. Add transitions from the activities


My style is always to exit an activity, even if it is simply to an ending point. Whenever there is more than one transition out of an activity, you must label each transition appropriately.

5. Add decision points


Sometimes the logic of what you are modeling calls for a decision to be made. Perhaps something needs to be inspected or compared to something else. Important to note is that the use of decision points is optional. For example, in Figure 1 I could just as easily have modeled the accepted and rejected transitions straight out of the "Enroll in University" activity.

6. Identify opportunities for parallel activities


Two activities can occur in parallel when no direct relationship exists between them and they must both finish before a third activity can. In Figure 1 you see it is possible to attend the overview or enroll in seminars in either order, but both activities must occur before you can end the overall process.

No comments:

Post a Comment