Write a program to create arithmetic worksheets and answer keys. (Addition, subtraction, multiplication, division)

Numbers should be randomly generated within a specified range. This allow the user to specify the maximum number of digits in each number. For example, 1 to 999.

With addition problems, the user should be able to specify the number of numbers to be added. (See problem box example below.)

a. Use only integers.

b. Output worksheets and answer keys as text or PDF files that can be printed.

c. Each worksheet and answer key pair should have a unique code on them so the can be matched up. For example, date/time stamp, random number, both, ...

d. Write the program in a modular form. Use an object or subroutine to create individual problems. For example, an addition problem object or subroutine. If you modularize the program it should be fairly easy to add other problem types.

e. Get the addition worksheet working first then add subtraction, multiplication, and division.

f. Create all of the problems and then output the worksheet and answer key.

g. To format a work sheet, consider each problem as a box, and a worksheet made of problem boxes.

Problem Box

Worksheet

h. Use a fixed width font (courier, ...) so things line up correctly.

i. The problem object or subroutine should be able to report how how big it is
(columns and rows of characters). For example,

This will simplify
finding the maximum problem box size and formatting the worksheet.
(Use a fixed box size for all problems?)

j. For simpler problems only allow

- Positive answers for subtraction problems

(*create the minuend; then create the subtrahend using the minuend as the upper limit*) - Whole numbers (integers) as answers for division problems

(*create the devisor and quotient; then create the dividend*)

k. Define a minimum lower range limit (0 or 1)

l. Define a maximum upper range limit (9999999)

m. Allow other lower number range limits. For example the range 4-222.

n. Division by zero is not allowed

- The program will ask the user for:
- What kind of problems to generate (addition,subtraction,multiplication,division)
- Number range (0-99999)
- The number of problems to generate (2 to 20)
- For addition, the number of numbers to be added (2 or greater)(maximum of 6?)
- For subtraction, only positive numbers for answers (yes/no)
- For division, only whole number for answers (yes/no)

- The program will output a worksheet and answer key that can be printed
- Error messages will be displayed when bad data is entered

Allow ranges with negative numbers.

Limit problems to those that do not "carry".

Create a worksheet that has a mixture of problem types
(addition,subtraction,multiplication,division)

Create worksheets for simple algebra equations.