CSCI 2341 Submission 03
Comparing Three Algorithms for Computing Sums of Integers
| Supplied file(s) (copy from $sup03) |
DemoCompareAlgorithms.jar (the demo executable)CompareAlgorithms.txt (the TextItems file of program
description)
|
|---|---|
| Files to submit |
CompareAlgorithms.jar (your executable jar file)CompareAlgorithms.java (your source code file)my_tests.sh (your completed testing script)
|
| Where to put them | Copy them to your u##/submissions/s03 folder |
| When they're due | Sun, Oct 26, 2025 @11:59pm |
This week your task is to write a program that tests or "profiles" three different algorithms that compute the sum of all positive integers from 1 up to a value input at the command line. The three algorithms are those shown as algorithms A, B and C in this image.
Your tester will again be an executable jar file that must perform in the same way as the supplied executable.
uxx account.
Develop your solution in a location other than the submission directory,
and only copy your solution files to the submission directory once you
have finished and tested your solution.
DemoCompareAlgorithms.jar with no command-line input to see
the opening identification screen and the program information screen.
Stopwatch and
OperationCounter), which are available from the
jxtra directory online that will help you with these tasks.
Be sure to study the interfaces to these classes so you know how to use
them.
my_tests.sh testing script.
submissions/s03 directory in your u## account.
CompareAlgorithms. Also note that this
approach will give two compiled classes, both of which must be included
in your jar file.
delay() method of the Stopwatch
class).