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
What runs horizontally and is identified with numbers?
kramer
D. the answer is Column 
6 0
3 years ago
Read 2 more answers
The first query is computationally less expensive than the second query. (Assume no indexes exist on release_date.) Query 1: SEL
sdas [7]

Answer:

false

Explanation:

The term 'computationally expensive' means that a given mathematical function, code or an algorithm has high computational complexity. In addition, the mathematical function or algorithm will require several steps and procedures to be completed. Based on this, the statement made in this question is not true.

7 0
3 years ago
A record is a specific piece of information state true or false​
Alex787 [66]

Explanation:

<h3> I think it is False</h3>

hope it's help

5 0
2 years ago
Moore’s law refers to?
puteri [66]

Answer:

Moore’s law states that processor speeds, or overall processing power for computers will double every two years.

Explanation:

  • Moore’s law is more than an observation than a law which was originated in 1970. The observation is about the number of transistors that is present in any system or an integrated system that will be doubled every couple of years.
  • The real-world application of Moore's law can be seen during computing your business taxes, piloting a spaceship, or changing the television station, etc.
7 0
2 years ago
Please help me. i will mark you brailiest
Stolb23 [73]

Answer:

Simple, really

Explanation:

3Rd one is pretty easy, all you have to do is read closely.

3 0
2 years ago
Other questions:
  • The instruction set for a microprocessor is unique and is typically understood only by the microprocessors of the same brand.
    7·1 answer
  • The internet is an example of
    12·2 answers
  • What are the desirable qualities of a Product Vision?
    11·1 answer
  • Which topology enables only one person, at one time, to send data to others on the network?
    6·1 answer
  • Write a function shampoo_instructions() with parameter num_cycles. If num_cycles is less than 1, print "Too few.". If more than
    7·1 answer
  • Which party controlled the White House and politics in the late 1800s, except for Grover
    6·2 answers
  • What is the traditional cognitive perspective ofHCL?
    12·1 answer
  • How do i make spaces in python<br> To draw hello world
    15·1 answer
  • 7.5 Code practice Plz answer ASAP
    15·1 answer
  • Which steps are correct for creating a document from a user-defined template?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!