Sei sulla pagina 1di 14

Q1. Consider the problem specification for the Course Registration System for college.

The new system will allow students to register for courses and view report cards from
personal computers attached to the campus LAN. The college will keep the existing
course catalog system where all course information is maintained.
Professors must be able to access the on-line system to indicate which courses they will
be teaching. Professors are assigned to course offerings and course catalogue is updated
by the registrar.
At the beginning of each semester students may request a course catalogue containing
a list of course offerings for the semester. Information about each course, such as
professor, department, and prerequisites will be included to help students make informed
decisions. The new system will allow students to select four course offerings for the
coming semester. In addition, each student will indicate two alternative choices in case
the student cannot be assigned to a primary selection. Course offerings will have a
maximum of ten students and a minimum of three students. A course offering with fewer
than three students will be canceled. For each semester, there is a period of time that
students can change their schedule. Students must be able to access the system during
this time to add or drop courses. Registrar will decide when to activate registration
opening and when to close registration. Once the registration process is, the registration
system sends information to the billing system so the students can be billed for the
semester.
Professor will also need to see which students signed up for their course offerings. In
addition, the professors will be able to record the grades for the students in each class. At
the end of the semester, the student will be able to access the system to view an electronic
report card.

Draw the use case diagram for the problem.

Draw the activity diagram using the swim lanes for all the actors.

Q2. Consider the following specifications of Airport Simulation.

The passenger enters the terminal building where the security checks his ticket and sends
him in if it is valid. The first security check is confirmation of passengers’ identity. If the
passenger is traveling internationally he needs to present his passport. The passenger and
his baggage are checked simultaneously. All public access is channeled through metal
detector and all items must go through an X-ray machine. When you check in, the agent
pulls up your itinerary on the computer and prints out one or more tags to attach to each
of your flight information on it. Now the baggage is loaded in the plane and Boarding
pass is given to him.

A ground engineer checks for the proper and perfect condition of the plane. Planes use
taxi runways to get from the gate to main runway for take-off and from a main runway to
the gate after landing. Ground controllers direct ground traffic from the airport’s tower.
The task of safe operations of aircrafts fall on air traffic controllers.
Make suitable assumptions and state them.

Draw the usecase model.


Draw the over all activity diagram
Q3. Create a sequence diagram for the following collaboration. Use the classes and
methods given in diagram. A customer wants to draw money from his bank account. He
enters his card into an ATM. The ATM machine prompts „Enter PIN“. The customer
enters his PIN. The ATM (internally) retrieves the bank account number from the card.
The ATM encrypts the PIN and the account number and sends it over to the bank. The
bank verifies the encrypted Account and PIN number. If the PIN number is correct, the
ATM displays „Enter amount“. User enters the amount. ATM draws money from the
bank account and pays out the amount.

Resolve all the messages and objects in the sequence diagram.

Draw activity diagram using swim lane.

4Q. Draw the state chart diagram for typical wrist watch that has two buttons MODE &
INC. When you enter time setting mode, you first see the hour display flashing and INC
increments the current value of hour(the value is 0 to 23 & it wraps). MODE wil next
take you to where you can change minutes, then MODE again takes you to where you
can adjust the seconds, then back to normal mode.
5Q. SUNHOLS Ltd, a major travel agency in the UK, has decided to develop a system
that will enable its customers to book and purchase flight ticket from the WEB.
Description of the use-case Book-Flight: The user specifies a
departure and a destination airport and indicates the date on which
she wants to travel. In order to avoid typing errors the system
presents the customer with all the direct flights available for the
route and date indicated along with the prices for the single and
return trips. These flights may be operated by different airlines. The
user may book one of these flights by pressing a book-flight button
available on her screen. After doing so a form will appear on the
screen. This form must be filled with the details of
the customer including his/her surname, initials, title, address
(street, number, city, postcode), day telephone number, and an e-
mail address (if available). If the user is a member of SUNHOLS
he/she may simply provide his/her membership-card number and
the system will find all these details. When the user provides the
required details and submits the filled form the system will check if
the address information provided is a valid UK address and if so it
will make the booking. The customer will be given a booking
reference number. Alternatively the customer may decide not to
proceed with the booking.
Develop a design class diagram including only the entity classes necessary for the "Book-
Flight" use case.

Q6. Consider the following specifications of Recruitment Processing System for any
organization.The advertisements for a particular post are placed in newspapers. The
candidates are selected based on the some eligibility criteria; it is based on the post. The
candidate is selected based on the written test and interview. Once the candidate is
selected, he or she is appointed as a Trainee for a period of six months and another six
more months on Probation. In this period the candidate is not eligible for any leaves and
benefits. The candidate’s performance in the Probation period is monitored and is
recorded by the HR Manager at regular intervals. After the completion of the probation
period of a candidate, the Manager evaluates the candidate’s performance and will
generate employee-id.
Draw the Use Case Diagram.
Draw the state chart diagram.

Q7. Consider the following specifications of Recruitment Processing System for any
organization.
The advertisements for a particular post are placed in newspapers. The candidates are
selected based on the some eligibility criteria; it is based on the post. The candidate is
selected based on the written test and interview. Once the candidate is selected, he or she
is appointed as a Trainee for a period of six months and another six more months on
Probation. In this period the candidate is not eligible for any leaves and benefits. The
candidate’s performance in the Probation period is monitored and is recorded by the HR
Manager at regular intervals. After the completion of the probation period of a candidate,
the Manager evaluates the candidate’s performance and will generate employee-id

Draw the activity diagram for whole System using swim lanes.
Q8. See the following figure & draw the class diagram with all functions that must be
present in classes along with relationship between them.

Q9. Specify a statechart diagram for the class Elevator in the class diagram below. Make
sure that your statechart diagram reflects the behavior of elevators which is specified by
the documentation of the class in the class diagram.
The class Elevator represents elevators. An elevator always starts at the ground floor
(floor 0) and its maximum idle time is set to 5. An elevator can be moving up or down.
When it receives the message "go_up" ("go_down") it starts moving up (down) to the
destination floor indicated by the message. As soon as the elevator arrives at the
destination floor it becomes idle. A time-out event, which occurs after a period of time
during which the elevator is idle on a floor, makes it move back to the ground floor. This
time-out event is determined by a timer and a maximum idle-time. As soon as the
elevator gets into the idle state the timer is set to 0. Every minute while the elevator is
idle the timer is being increased until it becomes equal to the maximum idle-time. This
designates the time-out event which makes the elevator move to ground floor.

Q10. Draw class Diagram to show that one Person can have more than one employment
with the same company. Employment period is one information associated with
Employment.
Draw another diagram to show that one Person can have one employment with the
company

Q11. A digital sound recorder (DSR) is a consumer electronic appliance designed to


record and play back speech. The messages are recorded using a built-in microphone and
they are stored in a digital memory. The user can quickly play back any message at any
moment through a speaker placed in the front of the device. DSR is small, light, easy to
use, and battery operated. It is a hand held unit with flat display and fairly large
buttons. It has internal timer. Alarm clock with calendar is present.
The current date and time is always shown in the display. The display also shows
clear directions about how to use buttons and what it is doing. Battery-level indicator is
also shown. Progress bar is also displayed which shows current task’s progress.
When a second passes internal clock is updated, alarm is checked (after every
second) and clock display is updated. DSR has capacity for ten different messages. The
length of each message is limited by the available memory. Direct access to any message
is provided. The user selects a message slot from the message directory and records. If
the message slot already stores a message, it is deleted. The system starts recording the
sound from the microphone until the user presses the ‘stop’ button, or the memory is
exhausted. The user selects a recorded message slot for playing. If the message slot
contains a recorded message then it is played trough the speaker until its end or until the
user presses the stop button. The user can delete the selected message. The message is
permanently deleted from the memory and its memory space is recycled. The user can
set a daily alarm. The alarm beeps until the user presses a key, or after 60 seconds. The
system beeps when the battery is low.
System automatically goes to Stand-by mode. It economizes the battery power. The
system switches off the peripherals. The normal operation is resumed when the user
presses a key.
Draw a use case diagram. Draw state-chart diagram for DSR.
Q12. Draw the class diagram from the following sequence diagram.

Q13. A digital sound recorder (DSR) is a consumer electronic appliance designed to


record and play back speech. The messages are recorded using a built-in microphone and
they are stored in a digital memory. The user can quickly play back any message at any
moment through a speaker placed in the front of the device. DSR is small, light, easy to
use, and battery operated. It is a hand held unit with flat display and fairly large
buttons. It has internal timer. Alarm clock with calendar is present.
The current date and time is always shown in the display. The display also shows
clear directions about how to use buttons and what it is doing. Battery-level indicator is
also shown. Progress bar is also displayed which shows current task’s progress.
When a second passes internal clock is updated, alarm is checked (after every
second) and clock display is updated. DSR has capacity for ten different messages. The
length of each message is limited by the available memory. Direct access to any message
is provided. The user selects a message slot from the message directory and records. If
the message slot already stores a message, it is deleted. The system starts recording the
sound from the microphone until the user presses the ‘stop’ button, or the memory is
exhausted. The user selects a recorded message slot for playing. If the message slot
contains a recorded message then it is played trough the speaker until its end or until the
user presses the stop button. The user can delete the selected message. The message is
permanently deleted from the memory and its memory space is recycled. The user can
set a daily alarm. The alarm beeps until the user presses a key, or after 60 seconds. The
system beeps when the battery is low. System automatically goes to Stand-by mode. It
economizes the battery power. The system switches off the peripherals. The normal
operation is resumed when the user presses a key.
Draw Sequence Diagram for entering and exiting stand-by mode.
Draw the state chart diagram for message slot.
Q14. Consider the Producer-Consumer problem with the following specifications.
Producer and Consumer are infinite processes deployed over single node. Producer will
produce the data and place in bounded buffer. Buffer is shared among producer and
consumer so they must use synchronization. Producer should not write item if the
consumer is reading the item, and it should wait. If the buffer is full producer will stop
and wait till at least one slot is free. Consumer will get the item from buffer and consume
it. If the producer is using buffer, consumer has to wait. Consumer will wait if the buffer
is empty. Producer and consumer will have specific time slots after that scheduler
dispatch will occur.

Draw the state chart diagram for Producer as well as consumer.

Draw the class diagram and forward engineer it to get the java code. Complete the
program and execute it.

Q15. Develop a UML class diagrams to express the following:


• A flight has a code number, a date and a price.
• Passengers have a name and an address, and may be booked on flights.
• There are firm bookings, where the whole price of the flight has been paid, and flexible
bookings, where only a deposit (smaller than the flight price) has been paid.
• A Flexible booking may be cancelled up to 10 days before the date of the flight; then
80% of the deposit paid will be returned. A firm booking may only be cancelled up to 20
days before the date of the flight, but then the complete flight price will be returned.
• Information about a flight may be printed: The fight number, and date will be printed,
followed by the name, address and the outstanding amount (i.e. price of flight) for each of
the passengers booked.

Q16. Consider the problem specification for the Course Registration System for college.
The new system will allow students to register for courses and view report cards from
personal computers attached to the campus LAN. The college will keep the existing
course catalog system where all course information is maintained.
Professors must be able to access the on-line system to indicate which courses they will
be teaching. Professors are assigned to course offerings and course catalogue is updated
by the registrar.
At the beginning of each semester students may request a course catalogue containing
a list of course offerings for the semester. Information about each course, such as
professor, department, and prerequisites will be included to help students make informed
decisions. The new system will allow students to select four course offerings for the
coming semester. In addition, each student will indicate two alternative choices in case
the student cannot be assigned to a primary selection. Course offerings will have a
maximum of ten students and a minimum of three students. A course offering with fewer
than three students will be canceled. For each semester, there is a period of time that
students can change their schedule. Students must be able to access the system during
this time to add or drop courses. Registrar will decide when to activate registration
opening and when to close registration. Once the registration process is, the registration
system sends information to the billing system so the students can be billed for the
semester.
Professor will also need to see which students signed up for their course offerings. In
addition, the professors will be able to record the grades for the students in each class. At
the end of the semester, the student will be able to access the system to view an electronic
report card.

Draw the activity diagram using the swim lanes for all the actors.

Draw state-chart diagram for a Course Offering.

Q17. Consider the problem specification for the Course Registration System for college.
The new system will allow students to register for courses and view report cards from
personal computers attached to the campus LAN. The college will keep the existing
course catalog system where all course information is maintained.
Professors must be able to access the on-line system to indicate which courses they will
be teaching. Professors are assigned to course offerings and course catalogue is updated
by the registrar.
At the beginning of each semester students may request a course catalogue containing
a list of course offerings for the semester. Information about each course, such as
professor, department, and prerequisites will be included to help students make informed
decisions. The new system will allow students to select four course offerings for the
coming semester. In addition, each student will indicate two alternative choices in case
the student cannot be assigned to a primary selection. Course offerings will have a
maximum of ten students and a minimum of three students. A course offering with fewer
than three students will be canceled. For each semester, there is a period of time that
students can change their schedule. Students must be able to access the system during
this time to add or drop courses. Registrar will decide when to activate registration
opening and when to close registration. Once the registration process is, the registration
system sends information to the billing system so the students can be billed for the
semester.
Professor will also need to see which students signed up for their course offerings. In
addition, the professors will be able to record the grades for the students in each class. At
the end of the semester, the student will be able to access the system to view an electronic
report card.

Draw the deployment view of the system.

Draw Use case diagram for the system.


Q18. Draw the deployment view for ATM system. Note that ATM system is distributed
system. Bank customer accesses the system through an ATM client node which access
the ATM application server (through internet) to perform the transaction. ATM
application server use, in turn, the ATM data server to perform transactions. ATM client
(machine with all devices) will just execute the ClientManager exe which will handle the
interface with the client. Also specify the processes deployed over the nodes.

Q19. Consider following specifications of Diagram Editor.


It is an interactive program which allows user to create simple graphical diagrams
built up of elements such as boxes lines and text.
1. Tools control the mode of operation of editor. Exactly one tool is active at any
one time.
2. Two kinds of tools exist.
a. Selection tool
When the selection tool is active, existing drawing elements can be selected
with the cursor. One or more drawing elements can be selected and manipulated; if
several drawing elements are selected, they can be manipulated as if they were
a single element. Current selection is displayed visually by displaying the control points
for the elements. You can move the element by pressing mouse button over element and
dragging the mouse. You can resize the element by pressing the mouse button over the
control points and dragging the mouse.
b. Creation tool.
When a creation tool is active, current selection is empty. Cursor changes in different
ways according to the specific creation tool, and the user can create the element of
selected kind. After the element is created, the selection tool is made active and the newly
created element becomes the current selection.
Text element … ..I-beam
Graphic element Cross hair
Selection tool Normal mouse pointer
User can also delete the elements, create new diagram, and can brows to next diagram.

Draw the use case diagram.


Draw the sequence diagram for select element use case. Note that selection tool asks the
current active Diagram to find that whether clicked position is on any element displayed
over the diagram. Diagram in turn asks all the elements, elements will return true if they
contain that position. Consider that 2 rectangles 1 ellipse and a line is on the diagram &
user clicked over the ellipse.

Q20. Draw a state chart diagram for simple traffic light.


It should switch from red to green when 10 cars back up at it or after 1 min, whichever is
earlier. It should also let all cars which were initially backed up at the red light up to the
point when the light changed from red to yellow, although it should not stay green for
more than 30 seconds.
Q21. Consider following specifications of Diagram Editor.
It is an interactive program which allows user to create simple graphical diagrams
built up of elements such as boxes lines and text.
1. Tools control the mode of operation of editor. Exactly one tool is active at any
one time.
2. Two kinds of tools exist.
a. Selection tool
When the selection tool is active, existing drawing elements can be selected
with the cursor. One or more drawing elements can be selected and manipulated; if
several drawing elements are selected, they can be manipulated as if they were
a single element. Current selection is displayed visually by displaying the control points
for the elements. You can move the element by pressing mouse button over element and
dragging the mouse. You can resize the element by pressing the mouse button over the
control points and dragging the mouse.
b. Creation tool.
When a creation tool is active, current selection is empty. Cursor changes in different
ways according to the specific creation tool, and the user can create the element of
selected kind. After the element is created, the selection tool is made active and the newly
created element becomes the current selection.
Text element … ..I-beam
Graphic element Cross hair
Selection tool Normal mouse pointer
User can also delete the elements, create new diagram, and can brows to next diagram.

Draw the sequence diagram for delete element use case. Suppose user deletes line from
above displayed diagram.

Draw the state chart diagram for selection tool.

Q22. Your college wants to make the process of marks online.Each instructor will update
internal marks on the college server which in turn is updated on the college website.
Student, parents, principal or any other can view the internal marks on the college
website. At the end of the semester when the external results are declared by the
university then an operator at the college server will contact the university server and get
the results and in turn update it to the college website too. College server will also do the
result analysis which will be helpful for the college administrative department.

Draw the usecase diagram.

Draw the deployment diagram.


Q23. Consider the following state chart diagram for Microwave oven.

Idle with door open Door closed

Door open entry/ turn on light


Door open
Idle with door
Door closed closed
entry/ turn light off
Cooking complete Cooking interupted

entry/ turn off tube entry/ turn off tube Door open
entry/ turn off light entry/ clear time
Button pushed
entry/ sound warning beep

Timer timeout
Button pushed Door open Initial Cooking Stage
Button pushed
Extended Cooking entry/ set timer
entry/ turn on light
entry/ Add 1 minute to timer entry/ turn n tube

Timer timeout

Draw the class diagram for Oven class with all attributes and operations. Generate the
code and write the definition of OnEntry() function of Oven class.

Q24. Consider the product requirement specification of the One Minute Micro waver.
1. There is single control button available for the users of the oven.
2. If the oven door is closed and the user pushes the button, the oven will cook (i.e.
energizes the tube) for 1 minute.Timer is set to one minute time.
3. If the user pushes the button at any time when the oven is cooking, user gets an
additional minute of cooking time. For example, if the user has 31 seconds more cooking
time to go and she pushes the button twice, the cook time is now for 2 minutes and 31
seconds.
4. Using the button with the door open has no effect.
5. There is a light inside the oven.
6. Any time the oven is cooking, the light must be turned on.
7. Any time the door is open the, the light must be on..
8. User can stop the cooking by opening the door. Timer is cleared.
9. If the user closes the door, the light goes out. This is the normal configuration when
user has just placed the food inside the oven but has not yet pushed the control button.
10. If the oven times out (cooks until the desired present time), it turns off both the power
tube and the light. It also then emits a warning beep to tell the user that the food is ready.
Draw the sequence diagram for normal case of cooking for two minutes.
Draw either Mealy or Moore State chart diagram for oven object.
Q25. Specify how many scenarios are present in the following activity diagram.
(Useful for viva)

Q26. Consider the product requirement specification of the One Minute Micro waver.
1. There is single control button available for the users of the oven.
2. If the oven door is closed and the user pushes the button, the oven will cook (i.e.
energizes the tube) for 1 minute.Timer is set to one minute time.
3. If the user pushes the button at any time when the oven is cooking, user gets an
additional minute of cooking time. For example, if the user has 31 seconds more cooking
time to go and she pushes the button twice, the cook time is now for 2 minutes and 31
seconds.
4. Using the button with the door open has no effect.
5. There is a light inside the oven.
6. Any time the oven is cooking, the light must be turned on.
7. Any time the door is open the, the light must be on..
8. User can stop the cooking by opening the door. Timer is cleared.
9. If the user closes the door, the light goes out. This is the normal configuration when
user has just placed the food inside the oven but has not yet pushed the control button.
10. If the oven times out (cooks until the desired present time), it turns off both the power
tube and the light. It also then emits a warning beep to tell the user that the food is ready.
Draw the sequence diagram for interrupted cooking (i.e. when the user opens the door
while cooking.) Draw either Mealy or Moore State chart diagram for oven object.

Q27. Refer to the diagram to answer the question. What is the maximum concurrent
threads that is possible in the activity diagram? (useful for viva)

Q28. POS system is a computer used in place of a cash register in retail applications.
Besides recording transactions, the computer can track inventory, print informative
invoices and receipts, and handle credit and debit card payments. The system usually
incorporates some form of Barcode reader.
A sales clerk will process a sale for a customer allowing the customer to purchase an
item. The sale will automatically be tracked in the inventory system. The system requests
authorization from a credit card authority to debit the card holders account for a specific
purchase. Sales clerk has to validate himself before using the system. The manager is an
employee of the store responsible for running a particular store. This includes
management of employees as well as sales and inventory. The store manager changes the
price of an item that is part of a sale. ( Typically in the case of discounted or damaged
items).

Draw the use case diagram for the system.

Draw the deployment view of the system.

Q29. Draw the deployment view for ATM system.


Note that ATM system is distributed system. Bank customer accesses the system
through an ATM client node which access the ATM application server (through internet)
to perform the transaction. ATM application server use, in turn, the ATM data server to
perform transactions. ATM client (machine with all devices) will just execute the
ClientManager exe which will handle the interface with the client. Also specify the
processes deployed over the nodes.

Q30. Draw the use case Diagram for Election Information System. This system allows
the voters to register themselves. They will be given unique voters id. Contestants are
also registered by Election commissioner. Election commissioner will declare the
commencement of election. Now in this period all the registered users will cast the vote.
All the information is maintained in database. After some period EC will stop the voting
process. The System will do the counting and will declare the results of polling. Make
suitable assumptions and specify it.

Draw usecase diagram.

Draw overall activity diagram.

Potrebbero piacerti anche