1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zysi [14]
3 years ago
15

Implement a Java program that creates math flashcards for elementary grade students. User will enter his/her name, the type (+,

-, *, /), the range of the factors to be used in the problems, and the number of problems to work. The system will provide problems, evaluate user responses to the problems, score the problems, and provide statistics about the session at the end. Functional Requirements
• User enters name at the beginning of a session. • System covers four math operations – addition, subtraction, multiplication, and division – with the user choosing which of the four operations to do in the session. Only 1 type of problem can be done in each session. • User will enter additional session parameters from prompts – number of problems to work and the range of values desired in the problems, e.g., addition with factors ranging from 0 to 12. • System will present problems to the user. • User will respond to problems with an answer and the system will provide im
Computers and Technology
1 answer:
jeka57 [31]3 years ago
8 0

import java.util.Scanner;

public class JavaApplication44 {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.print("Enter you name: ");

       String name = scan.nextLine();

       System.out.print("Enter your operation (+,-,*,/): ");

       String operator = scan.nextLine();

       System.out.print("Enter the range of the problems: ");

       int ran = scan.nextInt();

       System.out.print("Enter number of problems: ");

       int problems = scan.nextInt();

       int score = 0;

       for (int i = 1; i <= ran; i++){

           int first = (int)(Math.random()*ran);

           int sec = (int)(Math.random()*ran);

           System.out.print("Problem #"+i+": "+first + " "+operator+" "+sec+" = ");

           int ans = scan.nextInt();

           if (operator.equals("+")){

               if (ans == first + sec){

                   System.out.println("Correct!");

                   score++;

               }

               else{

                   System.out.println("Wrong. The correct answer is "+(first+sec));

               }

           }

           else if(operator.equals("-")){

               if (ans == first - sec){

                   System.out.println("Correct");

                   score++;

               }

               else{

                   System.out.println("Wrong. The correct answer is "+(first - sec));

               }

           }

           else if (operator.equals("*")){

               if (ans == first * sec){

                   System.out.println("Correct");

                   score++;

               }

               else{

                   System.out.println("Wrong. The correct answer is "+(first * sec));

               }

           }

           else if (operator.equals("/")){

               if (ans == first / sec){

                   System.out.println("Correct");

                   score++;

               }

               else{

                   System.out.println("Wrong. The correct answer is "+(first / sec));

               }

           }

           

       }

       System.out.println(name+", you answered "+score+" questions correctly.");

   }

   

}

I hope this helps!

You might be interested in
If you need to multiply 50 and 8 and divide by 2, what would you type on the numerlc keypad?
nata0808 [166]

Answer:

50*8/2

The asterisk is the multiplication sign and the parenthesis is the division.

I've never used an apostrophe for a multiplication sign before, but I'm guessing multiplication is what it stands for.

Explanation:

4 0
2 years ago
Your data warehousing project group is debating whether to create a prototype of a data warehouse before its implementation. The
Dvinal [7]

Answer:

Hmmm, what would i recommand i think you Should learn skills and become innovative  

Explanation:

Sir i'm gonna go toilet and come back

7 0
2 years ago
The point of (18 ,0) lies on​
zysi [14]
This point lies on the x value
4 0
2 years ago
Read 2 more answers
By the mid-1990s, how did revenue generated from video games compare to revenue generated from movies?
Vlad [161]

By the mid-1990s, the revenue generated from video games was two and a half times the revenue generated from movies.

Research shows that in 1994, the revenue generated from arcades in the United States was about $7 billion quarterly while the revenue generated from home console sales was about $6 billion dollars.

When combined, this revenue from games was two and a half times the amount generated from movies.

Learn more about video games here:

brainly.com/question/8870121

4 0
2 years ago
Gold is not more useful than iron. (Rewrite in positive form by replacing the comparative adjective)​
Sonja [21]

Answer:

Gold is more useful than iron

5 0
3 years ago
Other questions:
  • 10 facts about turbines
    11·2 answers
  • Which are benefits of modeling a solution? Choose all that apply. allows you to be sure the problem and solution are understood
    9·2 answers
  • After placing her insertion point after Grandma’s Kitchen, order the steps Danica needs to follow to insert and format the regis
    8·2 answers
  • Which tool do you think would be the most useful if you were designing a logo for a business?
    6·2 answers
  • Which of the following technologies is the best choice to convey urgent and highly sensitive information?a. Telephone b. Fax Let
    12·1 answer
  • Using a caesar cypher with an offset of three characters (a -&gt; d, b -&gt;e, ...., z -&gt; c), what would be the correct cyphe
    6·1 answer
  • A(n) __________ is a server with the original copy of the data that others need.
    12·1 answer
  • Here is the model I’m working on and can’t figure it out this model shows the basic process of making a protein what are the str
    14·2 answers
  • Write a program that calculates the average of N integers. The program should prompt the
    12·1 answer
  • Complete the code to finish this program to analyze the inventory for a store that sells purses and backpacks. Each record is co
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!