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
Judy is searching for files with a .jpg file extension on her laptop. Which type of file is she looking for?
nikklg [1K]
<span>JPEG files </span><span> are a common file format for digital photos and other digital graphics so she would be looking for a picture

</span>
6 0
3 years ago
Read 2 more answers
Which is the best organizational flow for a project?
abruzzese [7]

Answer:

client folder/project folder/images folder/image files

Explanation:

The basic propose of organizing projects documents and images is to find the documents in an easy manner.

The organizational flow of the document is as flow:

  1. First of all create the folder with the name of client, Whose project is going to be started. As there can be multiple clients, so make separate folder for each.
  2. In second step, Create the Project folder that is going to be started, as there are many projects you are working on for the same client.
  3. Then create the image folder inside the project folder, as there can be many other files types of the project.
  4. Then save the images in the image folder.

So, the option is better for this is

client folder/project folder/images folder/image files

6 0
4 years ago
DeShawn uses Google Ads. He wants to enable website call conversion tracking so he can see how his current ad campaign is drivin
eimsori [14]

Answer:

A dynamically created Google forwarding number

Explanation:

A temporary number that is used to forward the call that are  assigned to a Google Ads call extension is called Google forwarding number. This number is used to forwards calls to the advertiser's phone number for the purpose of tracking call conversions.

These number are created dynamically to trace the advertisers conversation.

5 0
3 years ago
5: what privacy issues have arisen with webcams in mobile devices?
AnnZ [28]

What are the privacy issues that have arisen with webcams and mobile devices? People secretly record and broadcast other people without their permission.

3 0
3 years ago
recursive function that accepts a stack of integers as a parameter and replaces every even value in the stack with two occurrenc
slega [8]

The solution is to keep all values in the Function Call Stack until the stack is empty. When the stack is empty, place all held items at the bottom of the stack one by one.

What is Recursive Function?

Recursive functions in code frequently rely on loop setups, in which the initial variable is called on multiple times while the loop is changing it. The factorial is a simple example of a recursive function in which an integer is multiplied by itself while being incrementally lowered. Many other self-referencing functions in a loop, for example, where n = n + 1 given an operating range, could be called recursive functions.

In addition to simpler recursive functions, programmers and others have created much more complex functions that also use recursion principles. Some, such as the Fibonacci sequence, have applications in finance and other fields, while others are esoteric and largely restricted to the IT community.

To learn more about Recursive Function, visit: brainly.com/question/28540529

#SPJ4

3 0
2 years ago
Other questions:
  • Convot the following biliary number into decimal form using any method ? (1010.100)2
    8·1 answer
  • An operating system is an example of which of the following
    13·1 answer
  • Create a program asks a user for an odd positive integer. If the user gives and even number or a number that is negative it prom
    7·1 answer
  • What are some objects in your home that demonstrate electrical energy to radiant energy to thermal energy
    10·2 answers
  • If you attempt an edgeunity quiz is your latest attempt the one counted?
    10·1 answer
  • Random letter of the alphabet for Python coding
    11·2 answers
  • Consider a Games Expo for Children. Six competitions are laid out for the expo. Tickets are sold according to the age and gender
    11·1 answer
  • The valence electron configurations of several atoms are shown. how many bonds can each atom make without hybridization? 2s^2 2p
    12·1 answer
  • What is the output of this program?
    10·2 answers
  • Matching parentheses. An math expression may have a number of parentheses like (, ), [, ], { and }. Each openning parenthesis (,
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!