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
...............is a personal computer that fits on desk.​
vesna_86 [32]

Answer:

desktop computer

Explanation:

8 0
3 years ago
Read 2 more answers
Which unit of measurement related to quantity
Lisa [10]

Answer:

Unit: A standard quantity against which a quantity is measured [e.g. gram, metre, second, litre, pascal; which are units of the above quantities].

Hope This Helps! :) ;)

Explanation:

Source:

https://www.canterbury.ac.nz/media/documents/science-documents/Measurement.pdf

6 0
3 years ago
Read 2 more answers
________is a Windows software program with powerful accessibility solution that reads information on your screen using synthesiz
inn [45]

Answer:

The correct answer to the following question will be "JAWS".

Explanation:

  • JAWS is a strong accessibility tool, which uses synthesized speech to look for information on your monitor and provides several helpful commands to make it much easier using applications, edit documentation and read pages of the web.
  • It's a Microsoft Windows screen reader tool that helps visually and blind impaired people to decode the screen either via a message-to-speech interpretation or with a castable sign language display.
  • JAWS is manufactured by Freedom Scientific Blind and Group of Low Vision.

Therefore, JAWS is the right answer.

4 0
3 years ago
In this lab, you will build a system for package delivery services that provides different shipping options with specific price.
Alex73 [517]

Answer:

See explaination

Explanation:

#include <iostream>

#include <string.h>

using namespace st d;

class Package

{

protected:

//sender properities

char sname[10],saddress[50],scity[20],sstate[20];

long int szip;

//Receiver properities

char rname[10],raddress[50],rcity[20],rstate[20];

long int rzip;

//additonal datamembers

float weight,cost;

public:

Package() //Default constructor

{

strcpy(sname,"");strcpy(saddress,"");strcpy(scity,"");

strcpy(sstate,"");szip=0;

strcpy(rname,"");strcpy(raddress,"");strcpy(rcity,"");

strcpy(rstate,"");rzip=0;

weight=cost=0;

}

Package(char sn[10],char sa[50],char sc[20],char ss[20],long int sz,char rn[10],char ra[50],char rc[20],char rs[20],long int rz,float w,float c) //Constructor with parameter

{

strcpy(sname,sn);strcpy(saddress,sa);strcpy(scity,sc); //copying each parameter value to data member

strcpy(sstate,ss);szip=0;

strcpy(rname,rn);strcpy(raddress,ra);strcpy(rcity,rc);

strcpy(rstate,rs);rzip=0;

weight=w;cost=c;

}

float calculateCost() //calculating cost

{

return weight*cost;

}

};

class TwoDayPackage:public Package //Inheritance

{

float flatfee;

public:

TwoDayPackage(char sn[10],char sa[50],char sc[20],char ss[20],long int sz,char rn[10],char ra[50],char rc[20],char rs[20],long int rz,float w,float c,float ff) //Constructor with parameter

{

Package(sn,sa,sc,ss,sz,rn,ra,rc,rs,rz,w,c); //calling super class constructor

flatfee=ff; //copy last parameter

}

float calculateCost() //redefined calculateCost function

{

return (weight*cost)+flatfee; //return total cost

}

};

class OverNightPackage:public Package //Inheritance

{

float addfee;

public:

OverNightPackage(char sn[10],char sa[50],char sc[20],char ss[20],long int sz,char rn[10],char ra[50],char rc[20],char rs[20],long int rz,float w,float c,float a f) //constructor with parameter

{

Package(sn,sa,sc,ss,sz,rn,ra,rc,rs,rz,w,c); //calling super class constructor

addfee=a f; //copy last parameter

}

float calculateCost() //redefined calculateCost function

{

return (weight*cost)+addfee; //calculating total cost

}

};

int main()

{

Package package1("lou brown","1 main st","boston","ma",11111,"mary smith","7 elm st","new york","ny",22222,8.5,0.5); //creating objects

TwoDayPackage package2("lisa klein", "5 broadway", "somerville", "ma", 33333, "bob george", "21 pine rd", "cambridge", "ma", 44444, 10.5, .65, 2.0 );

OverNightPackage package3 ("ed lewis", "2 oak st", "boston", "ma", 55555, "don kelly", "9 main st", "denver", "co", 66666, 12.25, .7, .25 );

cout<<"\nPackage Cost : "<<package1.calculateCost(); //calling each cost

cout<<"\nTwoDay Package Cost : "<<package2.calculateCost();

cout<<"\nOvernight Package Cost : "<<package3.calculateCost();

return 0;

}

8 0
3 years ago
A ____________________ can be used to hierarchically represent a classification for a given set of objects or documents. A. taxo
neonofarm [45]

Answer:

A. taxonomy

Explanation:

A taxonomy can be used to hierarchically represent a classification for a given set of objects or documents.

3 0
3 years ago
Other questions:
  • ​PeroxyChem's IT staff was able to free its IT staff to spend less time on routine maintenance and more time on strategic tasks
    11·1 answer
  • The United States is the only country in the world in which organs and tissue transplants are performed. True or False?
    8·1 answer
  • In which step of web design is storyboarding helpful?
    14·1 answer
  • Another personal question- are there any messaging sites that MIGHT work if most things are blocked via the school? I doubt anyt
    11·2 answers
  • 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
  • What happen if there is no authentication??
    10·2 answers
  • Look at (c), is it accurate? ​
    9·2 answers
  • Which family does Ms word 2007 belongs to?​
    6·2 answers
  • What is a program that includes a function parameter capable of doing?
    8·1 answer
  • Greenpeace used "Mister Splashy Pants" to:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!