answer.
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
harina [27]
2 years ago
8

Does the Boolean expression count > 0 and total / count > 0 contain a potential error? If so, what is it?

Computers and Technology
1 answer:
Semenov [28]2 years ago
6 0

<u>Answer:</u>

<em>Assuming that all the necessary declarations are made and given statements are only an extract, we can conclude that the given piece of code contains error. </em>

<u>Explanation:</u>

Let us analyze each one in order.

<em>count >0 </em> This statement is right if we match this with the <em>syntax of regular comparison operation</em>. Here count is an operand, “0” is the constant operand and these two operands are operated by the operator “>”.

when we take total / count >0 Here count>0 returns <em>Boolean and total is assumed to be an integer and an integer cannot be divided by a Boolean value. so it can be rectified as (total / count)>0. </em>

You might be interested in
Where does an MPLS label go in a PDU?
Natalija [7]

Answer: Between Layers 2 and 3

Explanation:

In between Layer 2 and Layer 3 the MPLS header is present and is known as Shim header. It is also said to be in 2.5.

6 0
1 year ago
The attack in which the attacker sends a forged packet with the same source IP address and destination IP address in which the v
Sergeeva-Olga [200]

Answer:

TEARDROP

Explanation:

Teardrop is a form of attack in which the attacker sends a forged packet with the same source IP address and destination IP address in which the victim may be tricked into sending messages to and from itself .

Teardrop attack also involves sending fragmented packets to a target machine in which the victim is been tricked into sending messages to and from itself. One of the fields in an IP header is the “fragment offset” field, indicating the starting position of the data contained in a fragmented packet relative to the data in the original packet.

7 0
2 years ago
PLEASE HELP PROGRAMMING WILL GIVE BRAINLIEST
JulijaS [17]
The fourth choice is correct.
5 0
2 years ago
Does the submission include the file "SuperPower.java"? Does the file include a public class called "SuperPower"? Does the class
Oduvanchick [21]

Answer:    

Here is the program fulfilling all the requirements given:

import javax.swing.JOptionPane;      

public class SuperPower{

public static void main(String[] args) {

String power;

power = JOptionPane.showInputDialog("What is your super power?");

power = power.toUpperCase();

JOptionPane.showMessageDialog(null, power);} }

Explanation:

Does the file include a public class called "SuperPower"

See the statement:

public class SuperPower

Does the class include a public method called "main"? Is the "main" method static?

See the statement:

public static void main(String[] args)

Does the main method have a String assignment statement that uses "JOptionPane.showInputDialog"

See the statement:

power = JOptionPane.showInputDialog("What is your super power?");

Does the main method have a statement that uses "JOptionPane.showMessageDialog"?

See the statement:

JOptionPane.showMessageDialog(null, power);

Does the program convert the String from "JOptionPane.showInputDialog" using the "toUpperCase" method?

See the statement:

power = power.toUpperCase();

Does the submission include a screenshot that shows an Input dialog that asks, "What is your superpower?" Does the submission include a screenshot that shows a Message dialog stating " TO THE RESCUE!", where "" is the input converted to upper case?

See the attached screenshots

If the program does not let you enter an exclamation mark after "to the rescue" then you can alter the code as follows:

import javax.swing.JOptionPane;

public class SuperPower{

public static void main(String[] args) {

String power;

power = JOptionPane.showInputDialog("What is your super power?");

power = power.toUpperCase();

JOptionPane.showMessageDialog( null, power+"!");} } // here just add an exclamation mark which will add ! after the string stored in  power

5 0
2 years ago
Remember that ""state space"" refers to the space of all potential possibilities. Which dichotomous questions below will success
egoroff_w [7]

Answer:

Please check options are not given. Please check explanation for corrected version.

Explanation:

Options are not mentioned. Please post the complete question.

However, if "below" is removed, the question makes sense. I am taking it that way.

Dichotomous question means those questions which has two outcomes: true or false.

For the given condition, this is possible only if:

  • coin shows head and dice shows 1
  • coin shows head and dice shows 2
  • head, 3
  • head, 4
  • head, 5
  • head, 6
  • tails, and all above cases

However, each time, each mentioned condition should be strictly followed.

And fewer outcome than 1 is virtually or realistically impossible, as both coin and dice will roll out one outcome in any condition certainly.

7 0
2 years ago
Other questions:
  • Which perspective is usually used in process simulations?
    6·1 answer
  • When ____ occur during preliminary debugging, dummy print statements—statements that are temporarily inserted into the code to d
    9·1 answer
  • Design a GUI program to find the weighted average of four test scores. The four test scores and their respective weights are giv
    5·1 answer
  • The term that refers to the programmer reading the program from the beginning and stepping through each statement is _________.
    5·1 answer
  • Write a program to help you feed your friends at a party by doing some math about square pizzas. Assume the grader defines a str
    12·1 answer
  • Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
    15·1 answer
  • Five friends plan to try a startup. However, they have a limited budget and limited computer infrastructure. How can they avail
    11·1 answer
  • What is the average number of nodes accessed in search for a particular element in an unordered list? In an ordered list? In an
    6·1 answer
  • A(n) ________ server tracks who is logging on to the network as well as which services on the network are available to each user
    9·1 answer
  • Which group contains the command to manually conduct a spell check ?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!