Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I don\'t know where to start PLEASE HELP ???? Create a program that interacts wi

ID: 3637037 • Letter: I

Question

I don't know where to start PLEASE HELP ????

Create a program that interacts with the user. The code have all seven requirements:

1. Use at least 4 objects (instances of different classes)
2. Use at least one example of inheritance
3. Use at least 2 loops
4. Use at least 2 selection statements
5. Use a random number
6. Include at least one array
7. Include data validation with proper prompting for valid input when data entered is wrong.

I thought of a program like a Math Tutor program that would do the following:

1. Prompts for the current user’s name
2. Gives instructions
3. Provides a menu of math choices (e.g., +. -, *, /), plus exit
4. Asks users how many questions they want to answer
5. Asks user for highest number to use
6. Displays appropriate math questions with random numbers
7. Keeps track of right and wrong answers
8. Provide any of a number of randomly chosen correct and incorrect answers for feedback
9. Gives feedback on how many questions answered and percent right for that group
10. Returns to menu for possible additional problems
11. When exit chosen shows grand total statistics – correct, attempted, and percent right

Please Help ??????

Explanation / Answer

import javax.swing.*; public class Main { double dRandom1; double dRandom2; double dRandom3; int iNumber1 = (int)(dRandom1 * 100) + 1; int iNumber2 = (int)(dRandom2 * 100) + 1; int iNumber3 = (int)(dRandom3 * 100) + 1; int iOperationChoice; int iDoAgain; public void SetUserChoice() { try { String soperationchoice = JOptionPane.showInputDialog("Press 1 to do Addition Press 2 to do Subtraction Press 3 to do Multiplication Press 4 to do Division 0 Exits"); iOperationChoice = Integer.parseInt(soperationchoice); } catch ( NumberFormatException nfe) { Main oUser = new Main(); oUser.SetUserChoice(); } switch (iOperationChoice) { case 0: if (iOperationChoice == 0) { System.exit(0); break; } case 1: if (iOperationChoice == 1) { GetAddition(); break; } /*case 2: if (iOperationChoice == 2) { GetSubtraction(); break; } case 3: if (iOperationChoice == 3) { GetMultiplication(); break; } case 4: if (iOperationChoice == 4) { GetDivision(); break; }*/ default: { JOptionPane.showMessageDialog(null, "Value out of range"); } } } public void GetAddition() { { String suseranswer = JOptionPane.showInputDialog("You will have three tries to get each answer correct. What is the sum of " + iNumber1 +" " + iNumber2 +" " ); int iUserAnswer = Integer.parseInt(suseranswer); int iSum = iNumber1 + iNumber2; for (int i = 0; i < 3; i++) { if (iUserAnswer iSum) { JOptionPane.showMessageDialog(null, "That is incorrect, the answer is lower, try again"); continue; } else if (iUserAnswer == iSum) { JOptionPane.showMessageDialog(null,"CORRECT!!!!"); SetContinue(); } } } } public void SetContinue() { try { String sdoagain = JOptionPane.showInputDialog("Do another? Press 0 to exit Addition Press 1 to continue Addition"); iDoAgain = Integer.parseInt(sdoagain); } catch ( NumberFormatException nfe) { SetContinue(); } switch (iDoAgain) { case 0: if (iDoAgain ==0) { System.exit(0); break; } case 1: if (iDoAgain == 1) { Main oAddition = new Main(); oAddition.GetAddition(); break; } default: { SetContinue(); } } } public Main() { Main oUser = new Main(); oUser.SetUserChoice(); } /** * @param args the command line arguments */ public static void main(String[] args) { } }
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote