4. What requirements qualify as functional requirements? Specify in what manner
they need to be achieved.
5. Which decisions are those taken by the software engineer about the best ways
(processes, techniques, and technologies) to achieve the requirements?
6. What type of testing refers to testing done by the clients (or somebody on their
behalf) to make sure the program runs as specified?
7. What is GUI? What is CLI?
8. List three of the typical kinds of nonfunctional requirements.
1.8 Exercises
1. For your next two software projects (assuming that you are getting programming
assignments; otherwise consider a program to find the
max and the min of a set of
rational numbers) estimate how much effort they would take before doing them,
then keep track of the actual time spent. How accurate were your estimates?
2. What sequence of activities did you observe in considering the programming
effort discussed in this chapter?
3. Discuss whether you think a programming language constraint may be viewed as
a requirement. Explain why you think so.
4. Download the programs for this chapter, and add at least one more test case for
each method of the
StringSorter class.
5. In the discussion of the simple program in this chapter, what were the items con-
sidered for “basic” design? Would you have written down these considerations
and perhaps reviewed them with a trusted person before the actual coding?
6. Consider a command-line interface that, rather than taking the file names as
parameters, asks for them from the keyboard (e.g., it displays “Input file name:”
then reads it from the keyboard). Would this be a better user interface? Why or
why not?
7. Consider a new user interface for our sorting program that combines the command-
line interface and the GUI. If it receives parameters in the command line, it does the
sort; if it does not, it displays the dialog. Would this be a better interface? What
would be its advantages and disadvantages compared with other interfaces?
1.9 Suggested Readings
K. Beck, Extreme Programming Explained: Embrace Change (Reading, MA: Addison-Wesley,
1999).
N. Dale, C. Weems, and M. R. Headington, Programming and Problem Solving with Java
(Sudbury, MA: Jones and Bartlett, 2003).
20 Chapter 1 Writing a Program
91998_CH01_Tsui.indd 20 1/10/13 6:19:03 AM