Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programmers frequently need to debug code. Sometimes it's their own code, but often its code written by other programmers. In this exercise you will

 

Programmers frequently need to debug code. Sometimes it's their own code, but often its code written by other programmers. In this exercise you will be given an IntelliJ project containing a program with several bugs. Some are syntax errors and others are logic errors. You will debug the program and get it working correctly. The Intellij file contains a set of unit tests. Fortunately, there are no errors in the unit tests (though the tests may detect errors in other parts of the code). The Program The program is designed to quiz young students on arithmetic problems. It quizzes students on addition, subtraction, and multiplication problems using pairs of random operands that can range from one to twelve. The program will present the student with six arithmetic problems. For each problem, the student will type their answer (followed by the Enter key). The program will tell the student if they were correct or wrong. If the student was wrong, the program will provide the correct answer. After the student completes the six problems, the program will tell the student how many problems they answered correctly and how many problems they got wrong. If the student had no wrong answers, the program will tell them their results were "Excellent!". Sample Output *** Arithmetic Quiz Answer 6 Questions Compute 10-2 = 8 Correct! DTERM Compute 68 -2 Correct! x Compute 5 x 3 15 Correct! Compute 9 x 2 = 18 Correct! Compute 125 = 7 Correct! Compute 6 x 6-30 Wrong! The answer is 36 Your score: 5 Correct 1 Wrong

Step by Step Solution

There are 3 Steps involved in it

Step: 1

To debug the code we will need to fix syntax errors and logic errors Here is the corrected code java ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probability And Statistics

Authors: Morris H. DeGroot, Mark J. Schervish

4th Edition

9579701075, 321500466, 978-0176861117, 176861114, 978-0134995472, 978-0321500465

More Books

Students also viewed these Programming questions

Question

Would giving rewards or administering punishments be

Answered: 1 week ago