{"id":58,"date":"2003-12-24T12:00:00","date_gmt":"2003-12-24T12:00:00","guid":{"rendered":"https:\/\/eric.tedjamulia.com\/blog\/java-arithmetic-levels\/"},"modified":"2003-12-24T12:00:00","modified_gmt":"2003-12-24T12:00:00","slug":"java-arithmetic-levels","status":"publish","type":"post","link":"https:\/\/eric.tedjamulia.com\/blog\/java-arithmetic-levels\/","title":{"rendered":"A few more choices for arithmetic practice"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I made another version of the arithmetic practice project. This one lets the calculation code work with a selected operation and difficulty level instead of treating every question the same way.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>Calculate<\/code> object remembers the operation and level. It generates an equation as a string, keeps the two operands, and has a separate method to test the answer. The easier range uses small positive numbers; the harder one can include negative values. Addition, subtraction, and multiplication all use the same object structure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Separating the question generator from the screen is a useful little improvement. The part that checks whether an answer is right does not need to know how the question was displayed. It is still a small program, but I like seeing how changing the structure can make adding another option less messy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/etedj.com\/projects\/java\/Applets\/CAIII\/\">CAIII files<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I made another version of the arithmetic practice project. This one lets the calculation code work with a selected operation and difficulty level instead of treating every question the same way. The Calculate object remembers the operation and level. It generates an equation as a string, keeps the two operands, and has a separate method [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[28,45,43],"class_list":["post-58","post","type-post","status-publish","format-standard","hentry","category-java-applets","tag-algorithms","tag-high-school","tag-java"],"_links":{"self":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/comments?post=58"}],"version-history":[{"count":0,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts\/58\/revisions"}],"wp:attachment":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/media?parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/categories?post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/tags?post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}