Tekniska Högskolan i Linköping
Institutionen för Datavetenskap
Mariam Kamkar
• Jour: Mariam Kamkar 281949/297950
• Hjälpmedel: Inga.
• Anvisningar:
- Alla svar skall motiveras och om förutsättningar saknas skall rimliga antaganden göras.
- Skriv tydligt.
- Skriv bara på en sida av papper.
1(4)
2(4)
1 (4 p)
1.1: What is an actor?
1.3: what is a use case?
1.3: what is flow of events?
1.4: what is an interaction diagram?
2 (6p)
Read the problem description of Payroll System and document system behavior in a use case model as following:
2.1: identify the actors, providing names and brief descriptions
2.2: find the use cases, providing names and brief descriptions
2.3: draw a use case diagram
2.4: given a use case for maintaining employee information, describe flow of events for such a use case.
2.5: create a sequence or collaboration diagram for a scenario for the use case in 2.4.
Problem Description - Payroll System
I. Brief Description
The system consists of a database of the employees in the company, and their associated data, such as timecards. All employees are identified by a unique ID number. The system must pay each employee the correct amount, on time, by method that they specify.
II. Employee types
Some employees work by the hour. They are paid an hourly rate. They submit daily timecards that record the date and number of hours worked. If someone works for more than 8 hours, they are paid 1.5 times their normal rate for those extra hours. Hourly workers are paid every Friday.
Some employee are paid a flat salary. Even though they are paid a flat salary, they submit daily timecards that record the date and hours worked. This is so the system can keep track of hours worked. They are paid on the last working day of the month.
Some of the salaried employees also receive a commission based on their sales. they submit purchase orders that reflect the date and amount of sale. The commission rate is determined for each employee and is one of 10%, 15% or 35%. Sales people are paid every other Friday.
III. Method of payment
Initially, the employee paycheck is held up for pickup by Paymaster. Employees can change their method of payment. They can have their paychecks mailed to the postal address of their choice or they can request direct deposit and have their paycheck deposited into a bank account of their choosing.
IV. Maintenance
Employee information is maintained by the Payroll Administrator. The Payroll Administrator is responsible for adding new employees, deleting employees and changing all employee information such as name, address, payment method and payment classification (hourly, salaried, commissioned).
3(4)
V. Other requirements
The payroll application will run every Friday and on the last working day of the month. It will pay the appropriate employees on that day. The system will be told what date the employees are to be paid, so it will generate payments for records from the last time the employee was paid to the specified date.
3 (5p)
List and describe the distinct phases of the waterfall life-cycle model. Analyze its strengths and weaknesses.
4 (5p)
List and briefly describe, each of the five levels of the Capability Maturity Model.
5 (5p)
Describe a solution to the following problem (known as the dining philosophers) by a petri net system and draw an example of its process.
The problem: Five philosophers are seated at a round table with Chinese foods. Each philosopher alternatively thinks or eats. Between each pair of neighbors there is one chopstick. To eat, a philosopher has to pick up both the chopstick on the left hand and on the right. There is a danger that all philosophers pick up one chopstick and will wait forever for the other. Your solution should prevent this.
6 (5p)
According Schach, in execution-based testing, five behavioral properties of a product must be tested.
List and briefly describe each of the five properties.
7 (10p)
Give minimal test data sets to satisfy the following three criteria for program IDA with two integer input parameters A and B (program IDA is presented as a control flow graph through nodes n1 to n11 ). A minimal test set that satisfies a criterion is not the smallest possible test case, but a test set such that if we remove any of the test cases then the set will not longer satisfy the criterion. The purpose of asking for a minimal set is so that listing all the tests is NOT a correct answer. Choose all your test cases from the following set for input variables A, B .
(11, 0)
(1, 0)
(11, 1)
(10, 0)
(1, 1)
(0, 0)
(11, 3)
(0, 1)
4(4)
C=0
M=30 n2
IDA (int A, int B)
A>0
X=B
M=34 n1
A<=0
A>10 n3
A<=10
C=C+1 n5
C<X n4
C>=X
A>0 AND B<=0 n7
A<=0 OR B>0
Z=3*M n8
Z=2*M n9
Z=4*C n6 n10
PRINT Z n11
7.1: Give a minimal test data set to satisfy the statement coverage criterion.
7.2: Give a minimal test data set to satisfy the decision coverage (branch coverage) criterion.
7.3: Give a minimal test data set to satisfy the multiple condition coverage (extended branch cover-
age) criterion.
8 (3p)
What is meant by each of the following types of maintenance:
8.1: Corrective maintenance
8.2: Adaptive maintenance
8.3: Perfective maintenance