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

  Determine throughput for file transfer form one host-another

Assume Host A wishes to send the large file to Host B. Suppose no other traffic in network, Determine the throughput for the file transfer?

  Discuss which quality systems the organization employs today

Material can be taken from the approved proposal that you submitted to the instructor. This may serve as the draft for the proposal.

  Describe the communication pattern of the binary-exchange

What are the parallel run time, speedup, efficiency, and isoefficiency function of the binary-exchange algorithm on a linear array?

  Define transferring data from any core to any other core

Explain why loose timings on RAM memory might be useful in a multicore environment. If you know how to do a timing diagram that could be useful but you can also explain the concept. Assume that transferring data from any core to any other core c..

  Calculate and display the total retail value of all products

calculate and display the total retail value of all products sold. Use a sentinel-controlled loop to determine when the application should stop looping display the final results.

  What is the difference between an interface and an abstract

What is the difference between an Interface and an Abstract class?

  Describe and explain the relationships among morality

Search the Internet to find an example of a hacking activity or situation that represents a morally, ethically, or criminally ambiguous situation but is different from any examples you used in other assignments for this course.

  Write a c function that calculates the least common multiple

Integers m and n are parameters to this function. Also write a main program to test this function with several pairs of integers. Use the library functions to convert and output the results.

  What is the difference between turn and roll

What is the difference between turn and roll? What difference does it make if you change the order of instructions in a particular world? When you are finished, click Tools on the menu bar, and then click World Statistics to see how long your Alic..

  Watch the two clips below about globalization

Watch the two clips below about Globalization.  In the media we see the products, but not how they are made.  How does this make you feel?  Do you think our media has a responsibility to show how the products we buy are made?

  You have 10 stacks of coins

You have 10 stacks of coins, each consisting of 10 quarters. One entire stack is counterfeit, but you do not know which one. You do know the weight of a genuine quarter and you are also told that each counterfeit quarter weights one gram more than it..

  Wired and wireless technology

Review the chart in the "Networking Technologies Used for Internet Connections" section of Chapter 16. What types of technology (wireless or wired) are used in business today? Include at least two examples. Which wireless technology types do you t..

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