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
pychu [463]
3 years ago
6

Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments to the bool variabl

es neutral, base, and acid: a. false, false, true if pH is less than 7 b. false, true, false if pH is greater than 7 c. true, false, false if pH is equal to 7.
Computers and Technology
1 answer:
Volgvan3 years ago
6 0

Answer

       if (pH<7.0){

           neutral=false;

           base=false;

           acid=true;

       }

       else if (pH>7.0){

           neutral=false;

           base=true;

           acid=false;

       }

       else if (pH==7.0){

           neutral=true;

           base=false;

           acid=false;

       }

A complete java program that prompts a user for the pH value is provided in the explanation section

Explanation:

import java.util.Scanner;

public class ANot {

   public static void main(String[] args) {

      Scanner in = new Scanner(System.in);

       System.out.println("Enter a value for the pH");

       boolean neutral, base, acid;

       double pH = in.nextDouble();

       if (pH<7.0){

           neutral=false;

           base=false;

           acid=true;

       }

       else if (pH>7.0){

           neutral=false;

           base=true;

           acid=false;

       }

       else if (pH==7.0){

           neutral=true;

           base=false;

           acid=false;

       }

}

}

You might be interested in
The _ are the devices that allow a computer system to communicate and interact with the outside world as well as store informati
padilas [110]

Answer:

I think the answer is the central processing unit. Hope it helps!!!!!

5 0
3 years ago
Refer to the exhibit. A network security analyst is using the Follow TCP Stream feature in Wireshark to rebuild the TCP transact
Mnenie [13.5K]

Answer:

Binary file.

Explanation:

                           In this case, the network security analyst is using the Follow TCP Stream feature in Wireshark to rebuild the TCP transaction. However, the transaction data seems indecipherable. The explanation for this is that the TCP transaction file is a Binary File and because of this the network secuirty analyst is unable to decipher the transaction file.

                           The solution for this is to convert the binary file into text file which is human readable.

3 0
3 years ago
What port does rdp use by default and from what range of numbers should you select a private port number?
VARVARA [1.3K]
The default RDP port is 3389 but can be configured in the range of <span>49152-65538</span>
5 0
3 years ago
when an overridden method is called from within a subclass, it will always refer to the version of that method defined by the (a
bija089 [108]

Option b is correct. When an overridden method is called from within a subclass, it will always refer to the version of that method defined by the subclass.

Subclasses are classes that can be created by adding new functionality to a parent class, such as new object variables or new methods. In terms of automata theory, a subclass expands the state transition table with new rows and states. However, by overriding (changing) existing functionality, the majority of OO programming languages also enable us to derive subclasses from parent classes. When implementing a class, all that is required to be specified is the new or updated functionality thanks to inheritance mechanisms between parent class and subclass.

Lines connected through a circle connect the subclasses HourlyEmployee and SalaryEmployee to the superclass Employee. The circled letter "d" stands for disjointness, which demands that the specification's subclasses be distinct. As a result, an entity can belong to only one of the specification's subclasses. An individual employee can only be paid either hourly wages or a salary; they cannot be paid both. The open sides of the inheritance (arch) symbols face the superclass.

To know more about subclass click on the link:

brainly.com/question/13790787

#SPJ4

6 0
1 year ago
How does a computer work
ivann1987 [24]

Answer:

computer works on electricity

Explanation:

6 0
3 years ago
Other questions:
  • Access controls are enforced automatically in FMS service routines that access and manipulate files and directories.
    9·1 answer
  • What are the advantages of repeating a header row? check all that apply
    14·1 answer
  • You use different office apps to accomplish specific tasks, such a creating a newsletter or producing a sales presentation, yet
    8·1 answer
  • Strong emotions can interfere with your ability to
    15·1 answer
  • How to get this on your screen in 2k20 on Xbox
    14·2 answers
  • How is counting in this circle and square system similar to how we count in our regular lives? How is it different?
    15·1 answer
  • 1. Some of the music in the 1960s was used to protest social and political issues. Is music still used as a form of protest? Why
    13·1 answer
  • Run the browser checker to see that the computer you are using now is set up for WileyPLUS. Which of the following browser funct
    15·1 answer
  • Which of the following items in the folder window allows users to view locations which have been visited before?
    6·1 answer
  • Which of the following is a key feature of a relational database?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!