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

  Benefits and challenges of enterprise application

Based on what you've learned about the benefits and challenges of enterprise application integration and how EAI can contribute to the business value, write a 2-3 page memo to your IT manager in which you advocate for or against the integration of..

  Any help with stark law is much appreciated

Two physicians, Dr. S. and Dr. V., leased a nuclear camera so they would no longer have to refer their patients to the local hospital for nuclear imaging.

  Advantages and disadvantages of a multi-user os

Determine whether or not Windows (e.g., Vista, 7, 8, and 10) can be considered a multi-user operating system. Provide a rationale for your response.

  8-bit registers are there in the intel 80x86 cpu design

In total, how many 8-bit registers are there in the Intel 80x86 CPU design presented in class? Name one of these 8-bit registers.

  What are the practical benefits

What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. import java.net.* versus import java.net.Socket)?

  Impact on the healthcare delivery

Health data has a big impact on the healthcare delivery. As a healthcare manager, what actions would you take to ensure security compliance? What considerations are needed in responding to a breach.

  Describe when you would want to use double hashing

Briefly describe when you would want to use double hashing. Also, provide an example of a rule that can be used for a double hashing probe sequence.

  Forensics evidence rules of features of the product

Computer Forensics Evidence Rules of features of the product. The features should be discussed, not simply listed in bullet form. Features to discuss should include, but not be limited to

  Distinct and separate programs

A-1-3 From a programing perspective, think of two (2) distinct and separate programs you use or have used. For example, you could use a game and a word processor. For each of the programing example, answer the following each questions.

  Explain file containing sporting goods which are sold online

You have file containing sporting goods which are sold online. Each item record contains item id, item name, item description, item category, item price, and units in stock.

  Report on content management services

Choose one Drupal site and one Joomla site (an alternative CMS package) from the lists below and evaluate them according to how well you think they manage and present their content.

  What standard network options match that speed

For the same assumptions as Exercise F.1, what is the minimum bandwidth of the slowest link to beat overnight delivery? What standard network options match that speed?

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