{"id":495,"date":"2015-05-15T16:13:17","date_gmt":"2015-05-15T06:13:17","guid":{"rendered":"http:\/\/casestudyhelp.com\/sample-questions\/?p=495"},"modified":"2018-01-29T20:04:10","modified_gmt":"2018-01-29T09:04:10","slug":"java-program-to-generate-a-math-practice-test","status":"publish","type":"post","link":"https:\/\/casestudyhelp.com\/sample-questions\/java-program-to-generate-a-math-practice-test\/","title":{"rendered":"Java program to generate a math practice test"},"content":{"rendered":"<p><strong>CMP 561<\/strong>: Assignment<\/p>\n<p><strong>Problem 1<\/strong><br \/>\nMath Quiz (100%) Write a Java program to generate a math practice test for a \frst grader.<br \/>\n1. Generate 100 questions<br \/>\n2. Questions include multiplication, addition, subtraction, and division.<br \/>\n3. First grade math does not teach negative numbers. For subtraction, minuend must be greater than or<br \/>\nequal to subtrahend. For division problems, quotient must be an integer.<br \/>\n4. Operands of addition and subtraction are in the range of [1-200]. Operands of multiplication and<br \/>\ndivision are in the range of [1-99].<br \/>\n5. There is a Question superclass. Multiplication, Addition, Subtraction, and Division inherit Question.<br \/>\n6. No repeated questions.<br \/>\n7. Answers are printed separately.<br \/>\n8. Questions are randomly generated.<br \/>\nSample output: Questions:<br \/>\n1 4 + 13 =<br \/>\n2 4 * 3 =<br \/>\n3 6 &#8211; 3 =<br \/>\n4 5 + 14 =<br \/>\n5 5 10 &#8211; 8 =<br \/>\n6 12 &#8211; 8 =<br \/>\n7 12 + 3 =<br \/>\n8 10 &#8211; 6 =<br \/>\n9 16 \/ 8 =<br \/>\n10 10 7 * 2 =<br \/>\n. . .<br \/>\n<strong>Answer<\/strong>:<br \/>\n15 1 4 + 13 = 17<br \/>\n2 4 * 3 = 12<br \/>\n3 6 &#8211; 3 = 3<br \/>\n4 5 + 14 = 19<br \/>\n5 10 &#8211; 8 = 2<br \/>\n20 6 12 &#8211; 8 = 4<br \/>\n7 12 + 3 = 15<br \/>\n8 10 &#8211; 6 = 4<br \/>\n9 16 \/ 8 = 2<br \/>\n10 7 * 2 = 14<br \/>\n25 . . .<br \/>\n<strong>Grading<\/strong><br \/>\nHomework is 100 points. 80 will re ect functionality and correctness. 20 points on your program will re ect<br \/>\nyour programming style, documentation. If you code does not compile, you will not receive any credit.<\/p>\n<p><strong> Page 2 of 3<\/strong><br \/>\nAnwar Mamat CMP 561 (Anwar 11:59pm): Assignment #1 Problem 1<br \/>\nCommenting and Documenting Code<br \/>\nCode must be properly commented. The main idea is that the grader should be able to understand your<br \/>\ncode easily, not have to tear his or her hair out wondering what some statement is doing. The \frst time you<br \/>\nhave to deal with poorly commented code (if you haven&#8217;t already), you will understand how annoying it is.<br \/>\nIn particular, the top of each code \fle should contain your name, the course and assignment numbers, and<br \/>\na brief summary of what&#8217;s in the \fle. Line-by-line comments should be included as necessary to make the<br \/>\ncode easy to read. A clear coding style, together with informative variable and function names, will reduce<br \/>\nthe number of comments required. Obscure code or cryptic function names will cause loss of points (for bad<br \/>\nstyle) and also require more extensive comments.<\/p>\n<p><strong> What to submit<\/strong><br \/>\nA single zip \fle called Assignment1 \frstname lastname.zip, where \frstname is your \frst name, and lastname<br \/>\nis your last name. In this zip \fle, put:<br \/>\n1. Java source<br \/>\n2. A README \fle with:<br \/>\n\u000f Instructions to compile and run of your code (include a description of command line options).<br \/>\n\u000f If your solution is not perfect, explain what parts you did and what part you did not do.<br \/>\n\u000f List of \fles submitted<br \/>\n\u000f All your data and results (in plain text \fles).<br \/>\n\u000f Anything else you want TA know<br \/>\n3. Submit this zip \fle to Moodle<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><strong>Please contact to our online chat operator to get complete solutions<\/strong><\/p>\n<p style=\"text-align: justify;\" align=\"center\"><a title=\"hire best assignment experts online\" href=\"https:\/\/casestudyhelp.com\/MyOrder.php\"><img decoding=\"async\" src=\"https:\/\/casestudyhelp.com\/images\/hire-best-assignment-experts-online.gif\" alt=\"Hire Your Assignment Writing Expert for Collage\/University\" \/><\/a><\/p>\n<p style=\"text-align: justify;\" align=\"center\">\n<p style=\"text-align: center;\"><strong>Ask Your\u00a0<a title=\"Computer Science Assignment Topics\" href=\"https:\/\/casestudyhelp.com\/computer-assignment\/\" target=\"_blank\">Computer Science Assignment Topics<\/a><\/strong><strong>?<\/strong><br \/>\n<strong>Check out our\u00a0<a title=\"Java Assignment Help Service\" href=\"https:\/\/casestudyhelp.com\/computer-assignment\/java-assignment-help-from-java-expert.html\" target=\"_blank\">Java Assignment Help Service<\/a><\/strong><br \/>\n<strong>Find Your\u00a0<a title=\"Java Programming Assignment Help Experts\" href=\"https:\/\/casestudyhelp.com\/computer-assignment\/java-programming-assignment-help.html\" target=\"_blank\">Java Programming Assignment Help Experts<\/a><\/strong><\/p>\n<script type=\"text\/javascript\" charset=\"utf-8\" src=\"http:\/\/w.sharethis.com\/widget\/?wp=6.2.9\"><\/script>","protected":false},"excerpt":{"rendered":"<p>CMP 561: Assignment Problem 1 Math Quiz (100%) Write a Java program to generate a math practice test for a \frst 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[116],"tags":[334,333,335,8],"_links":{"self":[{"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/posts\/495"}],"collection":[{"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/comments?post=495"}],"version-history":[{"count":3,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/posts\/495\/revisions"}],"predecessor-version":[{"id":2745,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/posts\/495\/revisions\/2745"}],"wp:attachment":[{"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/media?parent=495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/categories?post=495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/tags?post=495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}