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
Cómo se llaman los robots que se utilizan para la exploración espacial, en medicina, en la industria, en la agricultura, los que
Andrews [41]

La respuesta correcta para esta pregunta abierta es la siguiente.

Olvidaste incluir las opciones o los incisos que contienen las respuestas.

No obstante, con la idea de poder ayudarte hicimos una investigación y te podemos compartir lo siguiente.

Los robots que se utilizan para la exploración espacial, en medicina, en la industria, en la agricultura, los que se utilizan en el hogar se llaman "espacial, médico, industrial, agrícola, y doméstico."

Estos son los tipos de robots que ya se encuentran en la mayoría de empresas e industrias de nuestros países.

La robótica se empieza a adueñar de los trabajos que antes solamente podían realizar los seres humanos. Hoy en día, los trabajadores se ven desplazados de sus empleos porque la tecnología llegó para quedarse. Esto se ve claramente en las plantas armadores industriales que están llenos de robots que realizan funciones robotizadas.

De igual manera, los artículos electrodomésticos y la tecnología digital está haciendo uso de inteligencia artificial para eficientar las funciones del hogar.

6 0
4 years ago
Cyberstalking is an example of a:
babunello [35]

Answer:

A cyber crime

Explanation:

Cyberstalking is a type of cybercrime that uses the internet and technology to harass or stalk a person. It can be considered an extension of cyberbullying and in-person stalking.

7 0
2 years ago
Explain how a third party cookie can track your web browsing across multiple web domains.
Vlada [557]
A third party cookie can stay in your hard drive or browsing files, and record all the action

Hope this helps.
3 0
3 years ago
Before inserting a cover page or a blank page, where should the cursor be placed?
sp2606 [1]

Answer:

At the beginning of the first line on a page to insert the new page before.

Explanation:

if you need more assistance please let me know.

cheers

8 0
3 years ago
Read 2 more answers
How telecommunications works?​
SIZIF [17.4K]

Answer:

Telecommunications are the means of electronic transmission of information over distances. The information may be in the form of voice telephone calls, data, text, images, or video. Today, telecommunications are used to organize more or less remote computer systems into telecommunications networks.

Explanation:

3 0
3 years ago
Other questions:
  • Which feature in word automatically corrects typos, minor spelling errors, and capitalization as you type? autocomplete spelling
    14·1 answer
  • Although the traditional model of software acquisition still accounts for more software acquisition, a new model, called _______
    7·1 answer
  • Which is better intel or amd real debate.
    12·2 answers
  • What is the difference between a switch and a hub?
    8·1 answer
  • Number the steps to describe how Tristan can complete
    6·2 answers
  • Kahoot plzkahoot plzkahoot plz
    11·1 answer
  • Embedded operating systems control?
    5·1 answer
  • Escribe 10 ejemplos de lo que consideras un byte
    5·1 answer
  • What is the function of ROM?
    10·1 answer
  • Apart from using secure networks, how else can Dhruv keep his deliverables safe in the office and on the go? Select all that app
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!