Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 2: Programming (15 points) Write a complete Java program in a source file to be named Assignment4.java. This program will be a simple multiplication
Part 2: Programming (15 points) Write a complete Java program in a source file to be named Assignment4.java. This program will be a simple multiplication tutor program that will generate and score simple two factor multiplication problems for the user. The program should ask the user how many simple multiplication problems they want between 1 and 10). For each of the number of problems that the user requested, your program should do the following 1) generate a random multiplication problem where each of two factors is an integer between 0 and 12 There are a couple of different ways that yo might go about generating random factors in your program. One common way would be to use the Math.randome method. 2) display the problem for the user, like this: What is 5 * 3? 3) give the user up to 3 chances to enter the correct answer for this multiplication problem. If the user provides the correct answer for this problem, then your program should move on to the next multiplication problem. If the user enters 3 incorrect answers to a problem your program should then display the correct answer for that problem, and then move on to the next multiplication problem. Your program should keep track of the total number of correct answers given by the user and the total number of incorrect answers given by the user. After all multiplication problems have been finished, your program should display the total number of correct answers given by the user and the total number of incorrect answers given by the user. Sample Output, with user input in red. How many multiplication problems would you like (1 to 10)? 3 Problem 1: what is 5 * 3? Your Answer-->8 8 is incorrect. Your Answer --15 15 is correct Problem 2: what is 4 9? YourAnswer-1 1 is incorrect. Your Answer -> 2 is incorrect. Your Answer->3 3 is incorrect. The correct answer is 36. Problem 3: what is 2* 7? Your Answer -14 14 is correct. You gave 2 correct answers and 4 incorrect answers Note: Do not use any Java language or library features that we have not already covered in class. For example, do not use arrays or ArrayLists
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started