Engr 660: Software Engineering II
(Software Product Lines)
Fall 2003
Assignment #2
Due 11:00 a.m., 23 October 2003
This assignment requires that you use the small framework
described in the paper "Using the
Divide and Conquer Strategy to Teach Software Frameworks and
Patterns." Note that the paper describes the framework
(DivConqTemplate
, DivConqContext
, and
DivConqStrategy
classes and Problem
and
Solution
interfaces) and a sample quicksort application
built using the framework.
Tasks:
- Implement the framework from the paper in Java, C++, or some
other reasonable object-oriented programming language.
- Reimplement the quicksort algorithm using the Strategy technique
as described in the paper.
- Generalize the given quicksort application to work for an array
of more general objects. You cannot assume that these objects are
builtin objects with predefined comparison operators, but you can
assume that a total ordering can be defined on the set of all the
objects that you need to sort in one execution of the program.
So you will need to work out a technique for defining the comparison
in a manner that is flexible and supports resuse of the quicksort
code. That is, it should not be necessary to modify the quicksort
classes to change the type of objects.
- Implement a binary search algorithm using the framework.
- Implement some other divide and conquer algorithm using the
framework--for example, mergesort or matrix multiplication.
- Test all implementations thoroughly.
- Document the code appropriately.
When this assignment is complete, submit the following items. Be
sure that all items submitted are clearly labeled with your name and
the assignment number.
- a paper listing of your program source code and the outputs from
your testing of the program.
- a floppy or CDROM containing your program source code.
- instructions on how to run your program.
- a copy of the input file you used for testing.
UP to ENGR 660 assignments document?
Copyright © 2003, H. Conrad Cunningham
Last modified: 10:00 a.m., Thurs 9 October 2003.