
CS 451 Software Engineering
Winter 2009
Homework #1: A Sorting Program
Due: Tuesday, Jan 20th, 11:59pm
• This assignment is designed to loosen your programming, algorithm, modeling, and
pattern application muscles.
• This homework is supposed to be done individually.
Requirements:
1. Write a program in Java to read, sort, and print a sequence of characters. The program
should also print each unique string along with the number of occurrences of that string.
2. You program has to be configurable: the user should be able to choose either bubble sort or
quick sort.
3. Hand in a hardcopy of a UML class diagram modeling the design using Strategy Pattern. You
can draw the diagram using Visio (should be available from the department) or Dia (Open
Source). Be sure to include your name in a prominent location on your materials.
4. Hand in your source code.
5. Hand in a Readme file telling us:
a. How to run your program and how to configure your program to use different
algorithms.
b. How to input? (standard? Input file? Format?...)
c. How the input will be sorted (alphabetically? From smallest to largest?...)
d. How the output will be given? (standard? Output file?...)
e. Other necessary information for us to use your program, such as the maximum
length for the input, what constitute a valid input, etc.
Submission:
Submit (1) the UML diagram (in .pdf), (2) the source code (in .zip), and (3) a Readme file (in .txt)
through BbVista.