O'Reilly logo

Essentials of Software Engineering, 3rd Edition by Barbara Bernal, Orlando Karam, Frank Tsui

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

at the design and code implementation. While doing unit testing, the programmer has
access to the implementation but should still perform a mixture of black-box and white-
box testing. When we discuss implementations for our simple program, we will perform
unit testing on it. Testing will be discussed more extensively in Chapter 10.
1.4 Estimating Effort
One of the most important aspects of a software project is estimating how much effort
it involves. The effort estimate is required to produce a cost estimate and a schedule.
Before producing a complete effort estimate, the requirements must be understood. An
interesting exercise illustrates this point.
Try the following exercise:
Estimate how much time, in minutes, it will take you, using your favorite
language and technology, to write a program that reads lines from one file
and writes the sorted lines to another file. Assume that you will be writing
the sort routine yourself and will implement a simple GUI like the one shown
in Figure 1.21, with two text boxes for providing two file names, and two
buttons next to each text box. Pressing one of the two buttons displays a
File Open dialog, like the one shown in Figure 1.22, where the user can
navigate the computer’s file system and choose a file. Assume that you can
work only on this one task, with no interruptions. Provide an estimate within
1 minute.
Step 1.
Estimated ideal time: _______________
Is the assumption that you will be able to work straight through on this task with no
interruptions realistic? Won’t you need to go to the restroom or drink some water? Can
you spend the time on this task? If you were asked to do this task as soon as reasonably
possible, starting right now, can you estimate when would you be finished? Calculate the
number of minutes between now and the time you would be finished.
Step 2.
Estimated calendar time: _______________
Now, let’s divide the task into several subtasks. Assume you will create a class, called
StringSorter, with three public methods: Read, Write, and Sort. For the sorting routine,
assume that your algorithm involves finding the largest element, putting it at the end
of the array, and then sorting the rest of the array using the same mechanism. Assume
you will create a method called
IndexOfBiggest that returns the index of the biggest
element on the array. Using the following chart, estimate how much time it will take you
to do each task (and the GUI).
1.4 Estimating Effort
7
91998_CH01_Tsui.indd 7 1/10/13 6:19:01 AM

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required