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
pashok25 [27]
3 years ago
12

Write a Java program called Decision that includes a while loop to prompt the user to enter 5 marks using the

Computers and Technology
1 answer:
Alex73 [517]3 years ago
4 0

Answer:

Written in Java

import javax.swing.JOptionPane;

public class Decision{

public static void main(String[] args) {

    int i = 1;

    while(i<=5){

    String score = JOptionPane.showInputDialog("Input <score>");

    int mark = Integer.parseInt(firstNumber);

    if(mark >= 50 && mark <= 100) {

        JOptionPane.showMessageDialog(null, mark, " is a pass", JOptionPane.PLAIN_MESSAGE);

    }

    else{

        JOptionPane.showMessageDialog(null, mark, " is a fail", JOptionPane.PLAIN_MESSAGE);

    }

    i++;

    }

}

}

Explanation:

This initializes the a counter variable i to 1

    int i = 1;

The following iteration is repeated as long as i is less than or equal to 5

    while(i<=5){

This prompts user for input

    String score = JOptionPane.showInputDialog("Input <score>");

This converts user input to integer

    int mark = Integer.parseInt(firstNumber);

This checks if input is within 50 and 100 (inclusive)

    if(mark >= 50 && mark <= 100) {

This prints pass

        JOptionPane.showMessageDialog(null, mark, " is a pass", JOptionPane.PLAIN_MESSAGE);

    }

If otherwise

    else{

This prints fail

        JOptionPane.showMessageDialog(null, mark, " is a fail", JOptionPane.PLAIN_MESSAGE);

    }

This increments the counter variable by 1

    i++;

    }

You might be interested in
What invention during the renaissance period enabled people to purchase music for their own personal use?
bogdanovich [222]
Printing press_____________________________________________________                                                        
6 0
3 years ago
Read 2 more answers
A certain social media Web site allows users to post messages and to comment on other messages that have been posted. When a use
vagabundo [1.1K]

D) To determine which posts from a particular user have received the greatest number of comments

<u>Explanation:</u>

Since social media excepting comments from end user website or social media should keep track of end user information such as name with email address and phone extra.

If we do so we can end user information in cans, end user post, wrong post information can be blocked or given end user information for further analysis.  Moreover web site can receive positive or negative posts.

For me all four will be my answer. If we don’t track any information about end user it is against to law.

4 0
3 years ago
Your company wants to use an IoT device but wants to make sure it does not interfere with other RF devices that use the 2.4 GHz
Karo-lina-s [1.5K]

Answer:

Option 3 i.e., Z-Wave.

Explanation:

The Z-Wave device should be purchased by the company because It is a standard for connectivity, used mainly for smart home devices that use the 2.4 GHz RF band and this is also that device which the company wanted for the 50 meters away from the base station.  

So, It is a device should be purchased by the company.

Other options are incorrect because those devices not accomplish the following requirements.

7 0
3 years ago
PLEASEEEEE HELLPPP IT'S URGENT!!! PLEASEEEEE HELLPPP IT'S URGENT!!!
kogti [31]

Answer:

LED matrix is a grid of lights arranged into rows and columns

A battery is a device consisting of one or more electrochemical cells with external connections for powering electrical devices such as flashlights, mobile phones, and electric cars.

A processor is a machine that processes something.

An accelerometer is a tool that measures proper acceleration.

Universal Serial Bus is an industry standard that establishes specifications for cables and connectors and protocols for connection, communication and power

A compas is an instrument containing a magnetized pointer which shows the direction of magnetic north and bearings from it.

A block editor allows you to add Columns block, which basically adds two columns of paragraph blocks.

Iteration is the repetition of a process in order to generate an outcome.

Selection is the action or fact of carefully choosing someone or something as being the best or most suitable.

Algorithm is a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

debug identifies and remove errors from (computer hardware or software).

an arithmetical value, expressed by a word, symbol, or figure, representing a particular quantity and used in counting and making calculations and for showing order in a series or for identification.

I can do the rest if you want, just wanted to give you a head start :)

8 0
3 years ago
Identify two different uses/applications of data in which biases in word embeddings might cause significant ethical harms, then
olchik [2.2K]

The two different uses or applications of data that is biases in word embeddings and may cause significant ethical harms are:

  • Class immobility
  • Systemic racism

<h3>What are the biases in word embedding?</h3>

Word embeddings is known to be made up of a high level bias such as group stereotypes and prejudice.

The two different uses or applications of data that is biases in word embeddings and may cause significant ethical harms are:

Class immobility
  • Systemic racism

Learn more about biases from

brainly.com/question/24491228

#SPJ1

4 0
3 years ago
Other questions:
  • Which best describes IMEI?
    7·1 answer
  • When you schedule an appointment, Outlook adds the appointment to the ____ folder by default.
    10·1 answer
  • Henry is having a problem with the electrical system on his current laptop. The battery for the laptop will not charge. Henry to
    13·1 answer
  • Animations and transitions are added from the _____.
    11·2 answers
  • In the word interrupting, the root word rupt means:
    12·2 answers
  • Why computer manufacturers constantly releasing faster computers ?
    14·1 answer
  • Why do people yeet yeet and ree
    12·2 answers
  • What is the difference between spyware and adware?
    8·2 answers
  • ______ creates a unique and fixed-length signature for a set of data. It involves converting a numerical input into another comp
    15·1 answer
  • I'm doing a VHDL program in Vivado, using a zyboz7 20, which would have 2 teams, each of them with different buttons and led lig
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!