Submit Your Question

Answering Assignment Homework Questions

High Quality, Fast Delivery, Plagiarism Free - Just in 3 Steps

Upload Questions Details and Instructions:


Select Assignment Files

Get Assignment Help by Experts


Plagiarism-Free, Every Time

All of our assignment solution delivers with a dedicated plagiarism report

Excellent Subject Matter Expert

Get Supreme Assignment Help by highly Skilled Writers

100% Satisfaction Guaranteed

Score Higher or Your Money Back

Case Study Help reviews

Java program to generate a math practice test

CMP 561: Assignment

Problem 1
Math Quiz (100%) Write a Java program to generate a math practice test for a rst grader.
1. Generate 100 questions
2. Questions include multiplication, addition, subtraction, and division.
3. First grade math does not teach negative numbers. For subtraction, minuend must be greater than or
equal to subtrahend. For division problems, quotient must be an integer.
4. Operands of addition and subtraction are in the range of [1-200]. Operands of multiplication and
division are in the range of [1-99].
5. There is a Question superclass. Multiplication, Addition, Subtraction, and Division inherit Question.
6. No repeated questions.
7. Answers are printed separately.
8. Questions are randomly generated.
Sample output: Questions:
1 4 + 13 =
2 4 * 3 =
3 6 – 3 =
4 5 + 14 =
5 5 10 – 8 =
6 12 – 8 =
7 12 + 3 =
8 10 – 6 =
9 16 / 8 =
10 10 7 * 2 =
. . .
Answer:
15 1 4 + 13 = 17
2 4 * 3 = 12
3 6 – 3 = 3
4 5 + 14 = 19
5 10 – 8 = 2
20 6 12 – 8 = 4
7 12 + 3 = 15
8 10 – 6 = 4
9 16 / 8 = 2
10 7 * 2 = 14
25 . . .
Grading
Homework is 100 points. 80 will re ect functionality and correctness. 20 points on your program will re ect
your programming style, documentation. If you code does not compile, you will not receive any credit.

Page 2 of 3
Anwar Mamat CMP 561 (Anwar 11:59pm): Assignment #1 Problem 1
Commenting and Documenting Code
Code must be properly commented. The main idea is that the grader should be able to understand your
code easily, not have to tear his or her hair out wondering what some statement is doing. The rst time you
have to deal with poorly commented code (if you haven’t already), you will understand how annoying it is.
In particular, the top of each code le should contain your name, the course and assignment numbers, and
a brief summary of what’s in the le. Line-by-line comments should be included as necessary to make the
code easy to read. A clear coding style, together with informative variable and function names, will reduce
the number of comments required. Obscure code or cryptic function names will cause loss of points (for bad
style) and also require more extensive comments.

What to submit
A single zip le called Assignment1 rstname lastname.zip, where rstname is your rst name, and lastname
is your last name. In this zip le, put:
1. Java source
2. A README le with:
 Instructions to compile and run of your code (include a description of command line options).
 If your solution is not perfect, explain what parts you did and what part you did not do.
 List of les submitted
 All your data and results (in plain text les).
 Anything else you want TA know
3. Submit this zip le to Moodle

 

Please contact to our online chat operator to get complete solutions

Hire Your Assignment Writing Expert for Collage/University

Ask Your Computer Science Assignment Topics?
Check out our Java Assignment Help Service
Find Your Java Programming Assignment Help Experts

Get This Answer for Study Help

If you need study assistance with writing your questions and answers, our professional assignment writing service is here to help!

PLACE YOUR ORDER HERE

Content Removal Request

If you are the original writer or copyright-authorized owner of this article and no longer wish to have, your work published on casestudyhelp.com, then please Request for removal of this content.

Top