You are on page 1of 11

UML - Secomd Internal Paper Solution – 2012 (March


Q-1: Attempt following queastions. (Attempt any 3)
a. Simplify, “ State diagrams by using subdiagrams” with example. Ans.


A state is a condition during the life of an object during which it satisfies some condition, performs some activity, or waits for some external event. A substate is a state that is nested in another state. Substates may be nested to any level.

(a) Vending Machine State diagram.

(b) Despemse Item- Submachine or Subdiagram of vending machine.    In (a) initialy a cending machine is idle. When a person inserts coins, the machine adds the amount to the balance and validate some conditions, then person select an item. If item is not available or balance is insufficient than machine waits for another selection. Otherwise machine dispenses the item and perform changes. In (b) Nested state of vending machine is defined as DispenseItem. It also called a submachine. A submachine is a state diagram that invoked as a part of another state diagram.

 Concurrency within an object.  Aggregation concurrency. These processes typically are independent of one another. The aggreagate state is one state from the first diagram. b. any exit action for the substate is executed followed by any exit action for the enclosing composite state. Aggreagation is “and-relationship”. A concurrency is when two or more operations are performed simultaneously within a computer. What is Concurrency? Explain following. Objects are autonomous entities that change independently of one another. The state model implicitly supports concurrency among objects.OR You can also draw this diagram If a transition is from a substate within the composite state. Ans. . A transition from the composite state may occur from any of the substates and takes precedence over any of the transitions for the current substate. and second from other diagram and so on. its aggreagation is combined states of all the parts. An assembly is a collection of state diagrams.  Aggregation concurrency.

The state of the object include one state from each subdiagram. Each parts of the car undergoes transitions in parallel with all others. Transmission. . Here a Car shows the different states like Ignition. Define name of the composite state in a separate tab. The UML show consurrency within an object by partitioning the composite state into dotted region.Example: A Car as an aggreagation of parts states. Car will start moving when when upshift from neutral to first.    Concurrency within an Object    Concurrency within the state of single object occurs when this object can be partitioned into subsets of attributes or links. Accelerator and Brake. Each have their own subdiagram.

SDLC (Water Fall Model) can be represent given as below. using predefined techniques and notations.Example-1:  In the given example final state is decomposed into two concurrent substates. . What do you mean by Software Development Life Cycle (SDLC)? What are the phases (stages) of it? Ans.  Each of these concurrent substates (test ports and test modules) decomposed into sequential substates. separating them with dotted line. c. an undergraduate students have to complete both final year project and core subjects before he/she can be graduate. • • A software development process (SDLC) provide a basis for production of software. Hardware and Software test. Example-2:   Sometimes it is necessary to model several independent abstractions of attribute values.  When control passes from installation state to final state it forks to two concurrent flows Hardware nad software test. For example.

improve performance etc. purchase etc. When design of system completed. Here the example of an airoplane is given. Maintenance: Provide solution of problems. This model works well only after completion of all stages successfully. Explain term “Swimlanes” with example. the ground crew must add fuel.. Most of the organizations follow the waterfall approach when huge requirement of application is there.OR • • • Here developers first get the requirements. Each column is called swimlane. the activity will be assigned to each person. choose global strategies(planning) and principles for class design. Placing an activity into the swimlane indicates that it is performed by a person. System Design:Define architecture. Upgradation of application. and catering provide service for food and drink. The flight attendants must clean the trash. Implementaion: Translate the design into programming code and database structure. d. Phases: • • • • • • • • • System conception: Get an idea and gather requirements about an application . Understanding of requirements by constructing a model. At complex level these activites will be partitioned among organizations. Class-Design: Create real-world models for computer implementation. Activity diagram will be divide into columns and lines. then follow the design phase with analysis and System design. finance. marketing. Analysis: It specify “ What must be done not how it should be done ”. Swimlane boundaries indicate interaction amongs different organozations. Testing: Check whether the developed application is able for actual use and satisfy the requirements. . Then prepare class design (coding) . • • • • • • • There are different departments are available in an organizations such as Sales. Define algorithms for operations. Each phase must be complete before next phase is begun. Training: Help users to learn this new application Deployment: Keep the application for use by general users. then testing of application and at last deployment. Ans.

Activity Diagrams with swimlanes Q-2: Draw State and Use Case diagram for Restaurant System [3] State Diagram For Resturant vacancy Sitting in resturant provide menu no vacancy Wait decide order Give order wait for food Eating Ask for other order by waiter Provide Bill Pay bill and tip exit .

A customer can pay his bill by credit card or pay utility bill. Check-in a Room and Check-out a Room.  In this example. Ans.OR Q-2: Draw the use-case diagram for Hotel Information System. check-in and check-out of a room by Phone or via the Internet. while Individual customers make their reservations directly with the hotel.   . Based on these requirements. Tour Group customers are those who have made advanced reservations through a tour operator. cancel. cancel. Both groups of customers can book. There are booking process clerk and reception staff who manages it. consider a simple hotel information system for two groups of customers: Tour Group customers and Individual customers. check-in and check-out of a room by phone or via the Internet. there are four observable services as use cases: Make Booking. Both can book. There are two types of customers: Tour-group customers and Individual customers. Figure shows the use case model for this simple hotel information system. Cancel Booking.

Ans. System display portfolio information. User Logs-out. System verifies sufficient funds for purchase. system displays Good Bye screen. System displays confirmation screen with estimated cost. Scenario: User Log-in. System places order on securities exchange. System establishes insecure communication. [3] Activity Diagram: . User order for 200 shares of Elicon at the market price. System displays transaction tracking number. Securities exchange reports results of trade.Q-3: Write down Scenario and Draw Activity diagram for Stock Broker System. User confirms purchase. System establishes secure communication.

there should be a blank entry for a gratuity according to the customer’s discretion. For smaller groups. The total amount should be subject to tax and a service charge of 18% for groups of six of more. There should be a charge for each delivered item.OR Q-3: Prepare an activity diagram for computing a restaurant bill. Any coupons or gift certificates submitted by the customer should be subtracted. .

Cancel . [3] Steps : 1. Payment 4.Q-4: Draw a sequence diagram for Railway Reservation System. Issue ticket 3.Train Inquiry 2.

case diagram for Online Admission Process for Engineering Students in Gujarat. Ans.OR Q-4: Exaplain the use of “include” and “extends” relationships in use-case diagram? Draw the use. For “include” and “extends” relationships chapter-8 Online Admission Process .