Write a program that demonstrates the class

Assignment Help Basic Computer Science
Reference no: EM131111088

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: EM131111088

Questions Cloud

Affan debt payments-to-income ratio : Affan Chawdry has monthly net income of $1,050. He has a house payment of $450 per month, a car loan with payments of $250 per month, a Visa card with payments of $50 per month, and a credit card with a local department store with payments of $100..
The pattern-analysis rules to the control chart : University of Waterloo (Canada) statistician S.H. Stciner applied control chart methodology to the manufacturing of a horseshoe-shaped metal fastener called a robotics clamp (Applied Statistics, Vol. 47,1998).
The piston on the double-acting cylinder : 2a)When the piston on the double-acting cylinder is retracted (completes the instroke), the piston activates the roller control the left side of the 5/3 pilot valve, releasing air at the top left of the 5/3 and causing the piston to outstroke. Air in..
How should a business use working capital analysis : Compare and contrast the Internal Rate of Return (IRR), the Net Present Value (NPV) and Payback approaches to capital rationing. Which do you think is better? Why? Provide examples and evidence from two articles from ProQuest to support your posi..
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..
Annual interest rate of approximately : Please show your working-A person borrows $200 from a payday loan company, and pays $10 interest for two weeks. This would result in an annual interest rate of approximately ___ percent. Ignore compounding.
The process under statistical control : In their text, Quantitative Analysis of Management (1997), B. Render (Rollins College) and R. M. Stair (Florida State University), present the case of the Bayfield Mud Company. Bayfield supplies boxcars of 50-pound bags of mud treating agents to t..
Describe one organization/agency that would be involved : Describe one organization/agency that would be involved in care delivery for your hypothetical patient. Provide specific details related to: The geographic location in which it is located an dThe primary diagnosis of your hypothetical patient.
Quotations for numerous currencies : The "Market" section of the Bloomberg website provides interest rate quotations for numerous currencies. Its address is www.bloomberg.com.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  How does the hits algorithm use these concepts

How does the HITS algorithm use these concepts?

  Must the company use the ethernet or token ring protocol

XYZ Technology Consultants has offices on the second, third, and fourth floors of the office building it occupies. Must the company use the Ethernet or Token Ring protocol? Explain your choice. Why is this choice appropriate?

  An approved topic in mobile computing and commerce

This choice allows you the freedom to explore newer topics in mobile computing and commerce technologies. Youust have your topic approved by your tutor. Please submit a topic proposal of no less than 200 words to your tutor before you begin work.

  Explain the new features or functions

As a top computer engineer working in Silicon Valley, USA, you are given a task to design a new generation of computers.

  Determine the number of students having scores

Write a program that reads a file ("scores.txt") consisting of students' test scores in the range of 0-200. These scores should be loaded into a one-dimensional array. Then the program should determine the number of students having scores in each ..

  Propose a dhcp configuration

Your organization has expanded its network from one subnet to two subnets and is putting 200 computers on the new subnet, with plans for adding up to 100 more computers over the next few years.

  What are prototyping''s advantages and disadvantages?

What are prototyping's advantages and disadvantages?

  Last april the us supreme court heard arguments on whether

last april the u.s. supreme court heard arguments on whether or not all or part of the patient protection and

  Describe the benefits and risks of using these five methods

Describe the benefits and risks of using these five methods.

  Is it fine to use too many join operations in a query

Is it fine to use too many JOIN operations in a query

  Describe the three-schema architecture

Describe the three-schema architecture

  What are the four parts of the compiling process

Flip over this test. On the back of this test write your name in the upper, left-hand corner. What are the four parts of the compiling process

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