Write a program that demonstrates the class

Assignment Help Basic Computer Science
Reference no: EM131118151

Need help with C++.

The following table lists the freezing and boiling points of several substances.

Substance Freezing Point Boiling Point

Ethyl Alcohol -173 172

Oxygen -362 -306

Water 32 212

Design a class that stores a temperature in a the appropriate accessor and mutator functions. In addition to appropriate constructors, the class should have the following member functions:

isEthylFreezing. This function should return the bool value true if the tem- perature stored in the temperature field is at or below the freezing point of ethyl alcohol. Otherwise, the function should return false.

isEthylBoiling. This function should return the bool value true if the temper- ature stored in the temperature field is at or above the boiling point of ethyl alcohol. Otherwise, the function should return false.

isOxygenFreezing. This function should return the bool value true if the tem- perature stored in the temperature field is at or below the freezing point of oxy- gen. Otherwise, the function should return false.

isOxygenBoiling. This function should return the bool value true if the tem- perature stored in the temperature field is at or above the boiling point of oxy- gen. Otherwise, the function should return false.

isWaterFreezing. This function should return the bool value true if the tem- perature stored in the temperature field is at or below the freezing point of water. Otherwise, the function should return false.

isWaterBoiling. This function should return the bool value true if the temper- ature stored in the temperature field is at or above the boiling point of water. Otherwise, the function should return false.

Write a program that demonstrates the class. The program should ask the user to enter a temperature, and then display a list of the substances that will freeze at that temperature and those that will boil at that temperature. For example, if the temperature is 20 the class should report that water will freeze and oxygen will boil at that temperature.
C++ language only.

Here is what the program output should look like with example input: -400

Reference no: EM131118151

Questions Cloud

Read article- the general ethical principles of psychologist : Prepare a research proposal for one of Pavlov's research experiments involving children, adjusting it for current principles of ethical guidelines. Read the article "The General Ethical Principles of Psychologists" found in this week's Electronic R..
Examine cultural-economic-technological : Select a well-known American product and evaluate the potential to sell the product in a country outside the United States (where it is not sold presently). Examine cultural, economic, technological, and legal factors that could affect the success..
Undifferentiated marketing and differentiated marketing : What are the similarities and differences among concentrated marketing, undifferentiated marketing, and differentiated marketing?
Analysis of subsequent expenditures plant assets : (g) __________ Improvement to a machine that increased its fair market value and its production capacity by 30% without extending the machine's useful life.
Write a program that demonstrates the class : Write a program that demonstrates the class. The program should ask the user to enter a temperature, and then display a list of the substances that will freeze at that temperature and those that will boil at that temperature. For example, if the t..
Which of the two promotion strategies is more risky : Calculate the expected profit under each promotion strategy. Calculate the standard deviation of the distribution of profits for each promotion strategy. Which of the two promotion strategies is more risky?
The one-tailed probability if the effect : A two-tailed probability is .03. What is the one-tailed probability if the effect were in the specified direction? What would it be if the effect were in the other direction?
Does this explain their importance in a particular culture : In light of Erikson and Marcia's theories, discuss how the process of identity development is affected when the adolescent belongs to a minority group (racial, ethnic, sexual, or religious). Be sure to explain these theories and how they apply to ..
Conducted on the effectiveness of a class : Suppose a study was conducted on the effectiveness of a class on "How to take tests." The SAT scores of an experimental group and a control group were compared.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd