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 type of dns servers field dns queries, send iterative queries to upstream dns servers, or send requests to forwarders and t
photoshop1234 [79]

Answer:

catching only server to send iterative queries to upstream DNS servers, or send requests to forwarders

<h3>what DNS server normally sends iterative questions with another DNS server?</h3>
  • The DNS server sends an iterative query to a root server.
  • The root server responds with a referral to the top-level domain server address. a. Client's DNS server, with the top-level domain server address, generates a new iterative query and sends it to the top-level domain server.

To learn more about DNS servers, refer

to brainly.com/question/2051280

#SPJ4

6 0
2 years ago
PLS HURRY!!<br> Look at the image below!
Verizon [17]

Answer:

control

Explanation:

6 0
3 years ago
What does the gravity setting of a jump control?
Vikki [24]

Answer:

A

Explanation:

3 0
3 years ago
1. Write the Python code needed to perform the following:2. Calculate state withholding tax (stateTax) at 6.5 percent3. Calculat
Firdavs [7]

Answer:

salary=float(input("Enter salary : "))

numDependents=int(input("Enter number of dependents : "))

stateTax=salary*0.065

federalTax=salary*0.28

dependentDeduction=salary*0.025*numDependents

totalWithholding=stateTax + federalTax+ dependentDeduction

takeHomePay=salary- totalWithholding

print("State Tax :$",str(stateTax))

print("Federal Tax :$",str(federalTax))

print("Dependents:$",str(dependentDeduction))

print("Salary :$",str(salary))

print("Take-Home Pay:$",str(takeHomePay))

Explanation:

  • Take the salary as input from user.
  • Take number of dependents as an input from user.
  • Calculate the state tax and Federal Tax. Then calculate the independent detection tax by multiplying salary with 0.025 as well as number of dependents.
  • After that calculate total withholding and then calculate home pay by subtracting total withholding from salary.
  • Finally print all the details.
3 0
3 years ago
Marcus White has just been promoted to a manager. To give him access to the files that he needs, you make his user account a mem
Svetach [21]

Answer:

log off of his account and log back in

Explanation:

The first thing that Marcus should do would be to log off of his account and log back in. This is so that the new changes to his permissions can take effect. This should solve his problem and grant him access to all the permissions available in the Managers Group. If this does not work, then it is most likely that he is still in the previous group which has the Manager level permissions blocked. In this case he would need to leave the previous group that he is in because the blocking permissions overrides the access allowed from the Managers group.

4 0
3 years ago
Other questions:
  • Can you help please.
    11·1 answer
  • Design an algorithm for finding all the factors of a positive integer. For example, in the case of the integer 12, your algorith
    8·1 answer
  • 1. Do you consider Facebook, MySpace, and LinkedIn forms of disruptive or sustaining technology? Why?
    15·1 answer
  • teve wants to use Google Display Ads to reach new customers who are looking to purchase products similar to his. Which audience
    14·1 answer
  • A collection of facts can be copyrighted, but only if the collection is ____ in a way that causes the resulting work to rise to
    14·1 answer
  • Anna is looking for a job. Which two types of skills would she find necessary to secure a job ?
    5·1 answer
  • Given the following function definition
    13·1 answer
  • Where is Peru located?
    12·1 answer
  • What devices gives input​
    5·1 answer
  • , how do you make this user <br> XtraCrispyIzzy<br> 12 characters or less for microsoft?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!