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
describe at least five ways in which information technology can help studying subjects other than computing​
Oksana_A [137]

Answer:

I'd that IT can help in a great many different fields like

Mathematics, in a manner of solving complex math equations

Statistics, in a manner of creating complex graphs with millions of points

Modeling, in a manner of creating models from scratch, either for cars, personal projects or characters for video games and entertainment

Advertising, in a manner of using IT to create not only the advertisements themselves but also, spreading that advertisement to millions in a single click

Music/Audio, in a manner of creating new sounds and music that wouldn't be able to work in any practical manner

Explanation:

4 0
3 years ago
Digital rights include the right to
faltersainse [42]
D. Speak your ideas with respect on the internet .
7 0
2 years ago
____ takes the idea of breaking down a program into separate and reusable functions to the next level by focusing on the encapsu
STALIN [3.7K]
The answer is Object-oriented programming (OOP). This is a type of programming language model on the concept of "objects", which may comprise of data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods. The first step here is to classify all the objects the programmer wants to work and how they relate to each other, this is known as data modeling. Once an object has been identified, it is generalized as a class of objects which describes the type of data it comprises and any logic sequences that can manipulate it.
6 0
4 years ago
In the picture below
zhuklara [117]

Answer:

The answer is "It is a public method in the Car class".

Explanation:

In this question, the fourth choice is correct because the accessor method will be public, and the incorrect choice can be defined as follows:

  • The first and second choice was wrong because the class name is "Car".
  • In the third choice, it is wrong because the method will not be private.
  • In the fifth choice, it is wrong because the object name "mustang".
7 0
3 years ago
What is the best application to keep track of inventory for a store?
exis [7]

"The site iGeeks Blog recommends Inventory Tracker, which functions as a comprehensive inventory tracking system for iPad.

"It works excellently in synchronizing your inventory and comes with some really amazing features that you’d only expect from a desktop app," said the blog.

A free version of the app is available, and the pro version is just $3.99."

3 0
4 years ago
Other questions:
  • Identify the function for the following computer part: CD-Drive Question 17 options: A. Storage B. Output C. Input D. Processing
    12·1 answer
  • A ________ -tier design includes a middle layer between the client and server that processes the client requests and translates
    11·1 answer
  • What are some options available in the Spelling and Grammar Checker in word?
    6·1 answer
  • What do workspaces allow a company to do?
    9·1 answer
  • A method that movie distributors are adopting to make it possible to view movies instantly, without DVD, is known as:
    11·1 answer
  • What is the possible output from system.out.println((int)math.random() * 4)?
    8·1 answer
  • 5. The image file format most suited for photographs is what? *
    8·2 answers
  • Write a program that randomly (using the random number generator) picks gift card winners from a list of customers (every custom
    14·1 answer
  • n (m,n) correlating branch predictor uses the behavior of the most recent m executed branches to choose from 2m predictors, each
    11·1 answer
  • How to download film​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!