to get the file - Loyola University Chicago

advertisement
Software Testing Project 1
(programming and testing)
Brief but interesting programming assignment for use in developing testing skills.
Assignment:
1. Design and write a program to solve the simple numerical problem described
below.
2. Develop your program in Java (if you wish / need to use another language, please
ask first)
3. Test your program using whatever methods make sense to you
4. Make sure your program compiles and runs using the BlueJ compiler in the
Loyola computer systems
5. Turn in your resulting program in Blackboard.
6. YOU MUST DEVELOP YOUR OWN ORIGINAL PROGRAM – no good if you
copy a solution from the web (see the syllabus).
Requirements:
1. Input a single decimal number of arbitrary length.
2. Treat each digit in the number as a single separate digit. Pick digits from the
input so that the sum of your choice is the minimum possible - you can skip *at
most* one digit in a row. (If you skip digit n, then digit n+1 must be included in
the total).
3. Print out the input number, the set of numbers added, and the minimum total.
Examples:
Input 2413
Input 111114
Input 39915691
Input 142159119
Output 2+1=3
Output 1+1+1=3
Output 9+1+6+1=17
Output 1+2+5+1+1=10
MinSumAssignment (original) – ©W.L.Honig, Loyola University Chicago, 2007
Download