Assignment
Assignment
# Question CO
1 Prepare a class diagram for the dining philosopher problem. There are 5 philosophers and 5 2
forks around a circular table. Each philosopher has access to 2 forks, one on either side. Each
fork is shared by 2 philosophers. Each fork may be either on the table or in use by one
philosopher. A philosopher must have 2 forks to eat.
2 The tower of Hanoi is a problem frequently used to teach recursive programming techniques. 2
The goal is to move a stack of disks from one of three long pegs to another, using the third peg
for maneuvering. Each disk is a different size. Disks may be moved from the top of a stack on a
peg to the top of the stack on any other peg, one at a time, provided a disk is never placed on
another disk that is smaller than itself. The details of the algorithm for listing the series of
required moves depend on the structure of the class diagram used. Prepare class diagrams for
each of the following descriptions. Show classes and associations. Do not show attributes or
operations:
a. A tower consists of 3 pegs. Each peg has several disks on it, in a certain order.
b.A tower consists of 3 pegs. Disks on the pegs are organized into subsets called stacks.
A stack is an ordered set of disks. Every disk is in exactly one stack. A peg may have several
stacks on it, in order.
3 Prepare a portion of a class diagram for a library book checkout system that shows the late 2
charges for an overdue book as a derived attribute.
4 Consider an online airline reservation system. You may want to check airline Web sites to give 2
your ideas.
a. List two actors. Explain the relevance of each actor.
b. One use case is to make a flight reservation. List four additional use cases at a comparable
level of abstraction. Summarize the purpose of each use case with a sentence.
c. Prepare a use case diagram for an online airline reservation system.
5 Consider a physical bookstore, such as in a shopping mall. 2
a. List three actors that are involved in the design of a checkout system. Explain the relevance
of each actor.
b. One use case is the purchase of items. Take the perspective of a customer and list another use
case at a comparable level of abstraction. Summarize the purpose of each use case with a
sentence.
c. Prepare a use case diagram for a physical bookstore checkout system.
6 Prepare an activity diagram for computing a restaurant bill. There should be a charge for each 2
delivered item. The total amount should be subject to tax and a service charge of 18% for groups
of six of more. For smaller groups, there should be a blank entry for a gratuity according to the
customer’s discretion. Any coupons or gift certificates submitted by the customer should be
subtracted.
7 Prepare an activity diagram that elaborates the details of logging into an email system. Note 2
that entry of the user name and the password can occur in any order.
8 A customer decides to upgrade her PC and purchase a DVD player. She begins by calling the 2
sales department of the PC vendor and they tell her to talk to customer support. She then calls
customer support and they put her on hold while talking to engineering. Finally, customer
support tells the customer about several supported DVD options. The customer chooses a DVD
and it is shipped by the mail department. The customer receives the DVD, installs it satisfactorily,
and then mails her payment to accounting. Use swimlanes diagram to show the various
interactions.
9 Consider a workstation that is turned on. It goes through a boot sequence and then requests that 2
the user log in. After entry of a name and password, the workstation queries the network to
validate the user. Upon validation, the workstation then finishes its start-up process. Draw
activity diagram for the mentioned scenario.
10 Draw a sequence diagram for online exam system and Online Movie Ticket Booking System 2
11 A company is manufacturing a new product and must coordinate several departments. The 2
product starts out as a raw marketing idea that goes to engineering. Engineering simulates the
function of the product and prepares a design. Manufacturing reviews the design and adjusts it
to conform to existing machinery. Engineering approves the revisions and customer service then
looks at the design—a good design must enable ready repair. Engineering approves the customer
service proposals and ensures that the resulting design still meets the target functionality.
Construct an activity diagram for this process. Use swimlanes to show the various interactions.
Show the changes in the state of the design as the activity diagram proceeds.
12 An extension ladder has a rope, pulley, and latch for raising, lowering, and locking the extension. 2
When the latch is locked, the extension is mechanically supported and you may safely climb the
ladder. To release the latch, you raise the extension slightly with the rope. You may then freely
raise or lower the extension. The latch produces a clacking sound as it passes over rungs of the
ladder. The latch may be reengaged while raising the extension by reversing direction just as the
latch is passing a rung. Prepare a state diagram of an extension ladder.
13 Prepare a class diagram for a graphical document editor that supports grouping. Assume that a 2
document consists of several sheets. Each sheet contains drawing objects, including text,
geometrical objects, and groups. A group is simply a set of drawing objects, possibly including
other groups. A group must contain at least two drawing objects. A drawing object can be a direct
member of at most one group. Geometrical objects include circles, ellipses, rectangles, lines, and
squares.
14 Draw an Activity diagram for stock maintenance system. 2
Scenario: The online stock broker first verifies the order against the customer’s account, and then
executes it with the stock exchange. If the order executes successfully, the system does three
things concurrently: mails trade confirmation to the customer, updates the online portfolio to
reflect the results of the trade, and settles the trade with the other party by debiting the account
and transferring cash or securities. When all three concurrent threads have been completed, the
system merges control into a single thread and closes the order. If the order execution fails, then
the system sends a failure notice to the customer and closes the order.
15 Categorize the following relationships into generalization, aggregation, or association. 2
Beware, there may be n-ary associations in the list, so do not assume every relationship
involving three or more classes is a generalization. Explain your answers.
a. A country has a capital city. b.A person uses a computer language on a project.
c. A dining philosopher uses a fork. d.Modems and keyboards are input/output devices.
e. Classes may have several attributes. f. A file is an ordinary file or a directory file
g. Files contain records. h.A person plays for a team in a certain year.
i. A student takes a course from a professor j. A drawing object is text, a geometrical object, or a
group.
k. A route connects two cities. l. A polygon is composed of an ordered set of points.
GANPAT UNIVERSITY – U. V. PATEL COLLEGE OF ENGINEERING
Computer Engineering and Information Technology Department
B.Tech Sem V – Software Engineering (2CEIT502)
Assignment-2
# Question CO
1 Calculate and determine the development time, efforts and cost of following orders your software 4
company received from following clients:
Name of Company Hero Motocorp Maruti Suzuki Ashok Laylend
Kilo Lines of Code (KLOC) 32 137 332
Average salary of employee 17,000 Rs 17,000 Rs 17,000 Rs
Also identify the category of software according to the COCOMO model.
2 Compute the function point value for a project with the following information domain 4
characteristics:
Number of user Number of user Number of user Number Number of external
inputs outputs inquiries of files interfaces
32 60 24 8 2
Assume that all complexity adjustment values are of average type and degree of influence (DI)
as 25.
3 Do followings based on a sample code snippet given below: 4
(a) Prepare a Control flow Graph (CFG) of given code. 5
(b) Compute the McCabe’s cyclomatic complexity metric using all three methods.
(c) Compute the estimated length and volume of the same code using Halstead’s software
science.
1. scanf(“%d %d %d”,&a,&b,&c);
2. if(a>10)
3. {
4. printf(“Hello”);
5. if(b<a)
6. {
7. printf(“a”);
8. if(c>a)
9. {
10. printf(“c”);
11. }
12. }
13. else
14. {
15. printf(“b”);
16. }
17. }
18. printf(“Hi”);
4 Write a short note on Domain Analysis. 2
5 Discuss the problems of requirement Analysis with examples of each. 3
6 Assume that for the Patanjali Ayurved Ltd. software product; there are following set of activities 4
are to be performed as given in the following table. First, create an Activity Network representation
from the given table, then calculate the Early Start (ES), Early Finish (EF) , Latest Start (LS),
Latest Finish (LF), and slack time (ST). Also find out the Minimum time from it. Show
calculations of obtained values precisely.
Sr. No. Task Duration Dependency
1 Specification 15 -
2 Design Database 25 T1
3 Design GUI 30 T1
4 Code Database 60 T2
5 Code GUI Part 50 T3
6 Integrate and Test 75 T4 & T5
7 Write user manual 50 T1
7 What is a software myth? Discuss all different myths of different stakeholders of the project. 1
8 Identify at least three reasons in favor of why functional independence is the key factor for a good software 2, 3
design
9 Define Data Flow Diagram and symbols used for constructing DFDs? Draw the DFD up to level 2, 3
2 for RMS Calculating Software.
10 What do you mean by the term software reverse engineering? Why is it required? Explain the 6
different activities undertaken during reverse engineering