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

  Convert celsius temperatures to fahrenheit temperatures

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

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  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.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Develop a simple poker game

Develop a simple poker game

  Prepare a linear support vector machine svm

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

  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.

  Calculate the trajectory of a soccer ball

Write a program to calculate the trajectory (flight path) of a soccer ball

  Loops and if conditions

Write a program that requests a password

  Write two short c programs and solve exam-style problem

Write two short C programs and solve four exam-style problems.

  Describe the probability of the moves

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

  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.

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