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

  Describe two different kinds of communication software

Is Web search a database query? Explain your answer.

  Create class includes instance variables automatic propertie

Create a class called Employee that includes three pieces of information as either instance variables or automatic properties - a firstname (type string), a last name (type string) and a monthly salary (decimal)

  How does the failure region ofthe equality constraint differ

How does the failure region of the equality constraint differ from that of the inequality constraint studied in the earlier examples?

  What role to assign to four workstations

What role (or roles) would you assign to each of the four workstations and any other equipment you recommend? What type of upgrades, if any, might the workstations require to make your solution work?

  Write a java code which acts as a calculator

Can someone write this code for me really quick. Write a java code which acts as a calculator. I have two text fields.

  Should digital dynamics use separate portals for employees

How could the concept of supply chain management apply to a company's service- based division? Provide some specific suggestions.

  Compute and list the horizontal derivative values

Compute and list the 15 horizontal derivative values that may be defined from the successive 3-point data sequences.

  Describe what hacking of memory or hacking of ram means.

Use at least two (2) quality resources in this assignment. Note: Wikipedia and similar Websites do not qualify as quality resources.

  The telephone system uses geographical addressing

Why do you think this wasn't adopted as a matter of course by the Internet?

  What terms would you give these approaches

What terms would you give these approaches?

  Create an initial scene of a troll and a dragon

Create an initial scene of a troll and a dragon (Medieval) as shown below. The troll is trying to frighten away the dragon from his favorite hunting grounds

  Create an even better clever skater than the one presented

Then call the skate Around method-to make the skater skate around the penguin and then the duck. (This will require two calls to the skate Around method.)

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