CompSci 6 Spring 2010: Assignment 10
Due: Tuesday, April 27, 2010 - 11:59pm
10 points
There is nothing to snarf for this program, write it from scratch!
The Problem - Learning Math
The problem is to help 4th graders in the Durham community learn
their multiplication and division facts. There are software tools
that generate sheets of random problems but they could generate
problems more than once or give too many easy problems such as
multiplying by 0 or 1.
Your task is to generate a random math sheet of multiplication and
division problems such that there are not too many easy problems,
all the hard problems are there,
and each problem only appears on the sheet once. We want to make sure
that they get to practice most of their facts!
Here is the description of what should be on the math sheet.
- The sheet should have 100 multiplication and division facts on it
using single digits from 0-9 for multiplication facts and using the same
problems for division. Such as 8*9= and 72/8=.
- It will probably work best to print the problems 5 per line with a
blank between two rows and two blanks between each group of 10 problems.
an extra blank
- The output should be generated randomly, so each time the student
takes a 100 fact test, the problems are different and in a different
order.
- Make sure all the hard problems (those multiplication problems
with only digits from 6-9 or corresponding division problems
such as 6*7= and 49/7= )
appear at least once. We want to make sure they always practice
the harder problems like 7*8=
- Make sure each problem appears at most once. Note that 5*8=
is different than 8*5=, so at least one of these should appear and both
could appear, but there should not be two occurrances of 8*5=
- Those problems with digits 1 or 0 should be used with low priority so
there are not too many easy problems.
At least one problem with each digit (0-9) should appear.
- Notice that there is no input for this program.
The output should be to a text file OR can be to the console.
The output should have all 100 problems
fit on a standard sheet of 8 1/2 x 11 paper. See the sample output file.
Note the output should be different each time you run the program.
Design/Style
- Think about which classes and methods you will need to write.
- Think about what data should be state data
- Include appropriate comments: one for each method and a comment
for complicated sections of code inside a method. Include comments for
state data.
- Use meaningful variable names.
- Include a
paragraph description or outline of your design in your README file.
- Add an informational comment to your main class such as below.
// Author: Prof. Rodger
//
// Date: April 23, 2010
//
// Purpose: ?????
//
Submit
- In the same project, create
one text file called README that includes the following
information.
- Include a
paragraph description or outline of your design in your README file.
- Your name
- The date
- An estimate of how long it took you to do this assignment.
- The names of anyone you spoke with about this program. If you
discussed the solution with another student, include their name. If you
received help from a UTA or the professor, include their name.
Once your program is ready to submit. You need to submit
it under assign10mathSheet