Develop a basic temperature class

Assignment Help C/C++ Programming
Reference no: EM131366

You have to develop a basic temperature class.  Base skeleton code and a simple driver have been provided for you.  In this assignment, you must complete the subsequnt items:

double fahrenheitToCelsius(double f)

This function should convert the supplied Fahrenheit value into its Celsius equivalent.  The formula for doing so is:
        
double kelvinToCelsius(double k)

This function should convert the supplied Kelvin value into its Celsius equivalent.  The formula for doing so is:

double getTemperature(TemperatureScale_t scale) const

This function returns the internal representation of the temperature, stored in Celsius, to the requested temperature scale.

void addTemperature(double temperature, TemperatureScale_t scale)

This function adds the specified temperature, using the specified scale, to the current temperature.

void subtractTemperature(double temperature, TemperatureScale_t scale)

This function subtracts the specified temperature, using the specified scale, to the from the current temperature.

string toString(TemperatureScale_t output_scale = Celsius)

This function converts the Temperature into its string representation.  The conversion to Celsius is already provided and can be used as a template for outputting as Fahrenheit and Kelvin.

Reference no: EM131366

Questions Cloud

Total quality management : Total Quality Management and similar managerial commitments
Project plan written report : Sufficient information to enable the organisation's Board of Executives to understand the rationale for the program and the activities required to design, implement and evaluate the program including any additional data that would need to be colle..
Analyse the article or case study : Analyse the article or case study
Find an equation for the sphere : Find an equation for the sphere, in the form of a level surface
Develop a basic temperature class : You have to develop a basic temperature class
Catfish creek canoe company : Report on Catfish Creek Canoe Company
Case study (southwestern university) - forecasting problem : Case Study (Southwestern University) - Forecasting Problem
Relative positioning and interactive positioning : Relative Positioning and Interactive Positioning by Dragging and Clicking and some Simple Animation
Commercial law to open a meditation studio : Commercial Law open a meditation studio and looks around the inner city suburb of Paddington for suitable premises

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Iterative programming problem solving approaches

Write a recursive function void reverse ( ) that reverse a sentence

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Calculation of mortgage interest rates

Instruction of pointers and the calculation of mortgage interest rates.

  Describe the probability of the moves

Write a program in C++ to describe the Probability of the moves

  Develop a simple poker game

Develop a simple poker game

  Write the code

Write a program that allows an instructor to keep a grade book. Each students has scores for exams, homework assignments, and quizzes.

  Uml diagram of all the classes

Speaking of converting into the correct object-type, the goal of the factory is to abstract away object creation.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Time conversion

Write a C++ program that takes an Eastern standard time in hours, minutes, and seconds,and prints it out in Central time, Mountain time, or Pacific time.

  Show the deatils of an emplyoee - c programming

Show the deatils of an emplyoee in a neat format.

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Prepare a linear support vector machine svm

Write a computer program to prepare a Linear Support Vector Machine SVM

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