0% found this document useful (0 votes)
62 views5 pages

Sheet 4 Solution

The document discusses agile software development and extreme programming. It provides explanations of factors to consider when deciding whether to use agile methods, advantages of test-first development and pair programming. It also compares traditional waterfall model with agile testing and describes how agile principles can accelerate software development. Sample user stories, tasks and test cases are given for a student registration software project using agile methodology.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views5 pages

Sheet 4 Solution

The document discusses agile software development and extreme programming. It provides explanations of factors to consider when deciding whether to use agile methods, advantages of test-first development and pair programming. It also compares traditional waterfall model with agile testing and describes how agile principles can accelerate software development. Sample user stories, tasks and test cases are given for a student registration software project using agile methodology.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Alexandria University CS4E1: Software Engineering

Faculty of Engineering Spring 2018


Computer and Systems Engineering Dept. Sheet 4
Fourth Year

Sheet 4 Solution
Agile Software Development
1- What are the factors you should consider to determine whether to use agile methods or
not? Based on your answer, give an example on a project in which you apply an agile
method and another one on a project on which you will not apply it.

Several factors including:

 Nature of requirements of the project (static or dynamic).


 Size of the project.
 Type of customers.
 Developers required.
 Cost of refactoring.
 Amount of risk involved.

You can provide any examples that you see appropriate.

2- Explain why test-first development helps the programmer to develop a better


understanding of the system requirements. What are the potential difficulties with test-
first development?

Test-first development requires having a clear relationship between system


requirements and the code implementing the corresponding requirements. In test-
first development, the task developers have to thoroughly understand the
specifications so that they can write tests for the system.
Prof. Dr. Noha Adly Eng. Mai Ibrahim
1
Some difficulties are: programmers prefer programming to testing and sometimes
they take shortcuts when writing tests. Also, some tests can be very difficult to write
incrementally. (Example: in complex user interface, it is often difficult to write unit
tests for the code that implements workflow between screens.)

3- Suggest four reasons why the productivity rate of programmers working as a pair might
be more than half that of two programmers working individually.
1. Pair programming leads to continuous reviewing. This helps to discovers bugs
more quickly.
2. Information sharing in pair programming happens during the process. This reduces
the need for documentation and the time required if one programmer has to pick
up another's work.
3. Pair programming encourages refactoring (the code must be understandable to
another person). This reduces the costs of subsequent development and change
and means future changes can be made more quickly.
4. In pair programming, the pair focus on the essential features of the system which
helps them to produce it more quickly.

4- Extreme programming expresses user requirements as stories, with each story written
on a card. Discuss the advantages and disadvantages of this approach to requirements
description.

Advantages:

 They represent real situations that commonly arise so the system will support
the most common user operations.
 It is easy for users to understand and critique the stories.
 They represent increments of functionality and implementing a story delivers
some value to the user.

Disadvantages:

 They are liable to be incomplete and their informal nature makes this
incompleteness difficult to detect.
 They focus on functional requirements rather than non-functional
requirements.
 Representing cross-cutting system requirements such as performance and
reliability is impossible when stories are used.
 The relationship between the system architecture and the user stories is
unclear so architectural design is difficult.

Prof. Dr. Noha Adly Eng. Mai Ibrahim


2
5- Explain how the principles underlying agile methods lead to the accelerated
development and deployment of software.

The principles underlying agile development are:

 Individual and interactions over processes and tools.


By taking advantages of individual skills and ability and by ensuring that the
development team know what each other are doing, the overheads of formal
communication and process assurance are avoided. This means that the team
can focus on the development of working software.
 Working software over comprehensive documentation.
This contributes to accelerated development because time is not spent
developing, checking and managing documentation. Rather, the programmers’
time is focused on the development and testing of code.
 Customer collaboration over contract negotiation.
Rather than spending time developing, analysing and negotiating requirements
to be included in a system contract, agile developers argue that it is more
effective to get feedback from customers directly during the development about
what is required. This allows useful functionality to be developed and delivered
earlier than would be possible if contracts were required.
 Responding to change over following a plan.
Agile developers argue (rightly) that being responsive to change is more effective
than following a plan-based process because change is inevitable whatever
process is used. There is significant overhead in changing plans to accommodate
change and the inflexibility of a plan means that work may be done that is later
discarded.

6- Explain the difference between traditional Waterfall model and Agile testing.

Agile testing is done parallel to the development activity whereas in traditional


waterfall model testing is done at the end of the development. As done in parallel,
agile testing is done on small features whereas in waterfall model testing is done on
whole application.

Prof. Dr. Noha Adly Eng. Mai Ibrahim


3
7- You were asked to implement a software for undergraduate students registration in
your university. You decided to use the agile methodology for this task:

a. Determine the stakeholders of this software.

Possible stakeholders may include: Student, University as courses provider and


registration employee.

b. Derive three user stories for this software.

Possible user stories can be include:

- View available courses story.


- Fill registration form story.
- Update registration form story.

You should describe the user story as shown in figure 3.5 in the reference.

c. Derive tasks from your user stories, give them priorities, and put an initial
reasonable schedule for these tasks.

Break the stories to tasks as shown in figure 3.6 in the reference.

d. Write at least five test cases for one of the functions of this software.

Test cases should cover all corner cases and they should be written in a way similar
to that in figure 3.7 in the reference.

8- In Sheet 2, problem number 2, you have designed a use case for withdraw function of an
ATM machine. Write the test cases that you would use to test this function (even if you
do not have the code and it is not required).

You can mention other test cases as long as they cover all cases that may occur related
to the withdraw functionality. These test cases should include:

Test Case 1: Test for inputs where the PIN code is not correct.

Input: Incorrect PIN.


Output: Error message indicating invalid PIN code.

Prof. Dr. Noha Adly Eng. Mai Ibrahim


4
Test Case 2: Test for inputs where the PIN code is correct but the amount of money to
withdraw exceeds the user balance.

Input: Correct PIN and amount of money to withdraw.


Output: Error message indicating insufficient balance.

Test Case 3: Test for inputs where the PIN code is correct and the user balance is
sufficient to withdraw the needed amount.

Input: Correct PIN and amount of money to withdraw.


Output: Successful operation message and the withdraw amount should be
deducted from the user balance.

Prof. Dr. Noha Adly Eng. Mai Ibrahim


5

You might also like