Machine that i would like to know

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

Let's say I have a machine that I would like to know, on average, how much it runs throughout a given day through a percentage value. Every 30 seconds, I will have a device to record the current temperature of the machine. If the machine increases its temperature by at least 0.5 degrees F in one of the 30 second windows, I will know that the machine is turned off. If the machine decreases its temperature by at least 0.5 degrees F within a 30 second window, I will know that the machine is turned on. If the machine does not change by 0.5 degrees, it will assume its same on or off status.

Now, I would like to also gather percentage data within each hour. This means that there are 120 30-second intervals within an hour, and there are 24 hours in a day. I have a file that I must read from containing 2,881 decimal values of type double for all of the hourly interval values. I first want to read in all 2,881 values, then create an array with 24 indices for each hour of the day. I want to find the percentage of time the machine is ON within each hour, and then store each hour percentage within its respective array index. This means that I will want to calculate the percentage of ON time for every 120 values in the file I am reading from.

I must gather each hourly percentage so that I can then output the values into a self-made bar graph (the bars consisting of astericks). The vertical values (or y values) will show percentage values from 0-100 in 5 percent intervals. The horizontal values (or x values) will show which hour of the day it is, starting at midnight and ending at 11 pm in 1 hour intervals. For each hour's ON percentage, a loop should output an asterick or a space moving row to row and starting from the y value of 100. This will create the appearance of a bar graph. Note that during the midnight hour, the machine is always OFF, and this means that the first column of the chart will contain no astericks, so that each time the code loops through a row, the array index of zero (representing 12 midnight) will always print a space instead of an asterisk.

Overall, I must also calculate the average percentage of time the machine was turned on throughout the entire day.

Reference no: EM13166678

Questions Cloud

How many grams of potassium permanganate are needed : how many grams of potassium permanganate are needed to decolorize 1 gram of 2-pentene in basic solution?
State photon of red light and reemit photon of violet light : Is it possible for an atom to absorb a photon of red light and reemit a photon of violet light
Calculate the work observed for the volume change : A sample of CO2 g in a piston at 7.5 atm and 1090. L is allowed to come to equilibrium against a constant external pressure of 8.3 atm at constant temperature. Calculate the work observed for the volume change in the piston (in kJ).
What volume of bleach would be required : what volume of bleach (6%w/v=6g/100ml) would be required to oxidize 5.0 mL of methanol (density 0.890 g/ml) to methanone?
Machine that i would like to know : Let's say I have a machine that I would like to know, on average, how much it runs throughout a given day through a percentage value. Every 30 seconds, I will have a device to record the current temperature of the machine. If the machine increases..
Compute the allocation of partners total payments for 2013 : There is $83,000 in the firm's bank account after all other assets have been liquidated.  Allocate the bank balance among all of the involved parties:  Creditors, Partner Adkins, Partner Bell, and Partner Fox.
Passing an "in out" parameter to a procedure : In Ada, when passing an "in out" parameter to a procedure, the system is allowed to use either pass-by-reference or pass-by-value-result as it sees fit. Why?
What is the kinetic energy of electrons ejected : the threshold wavelength for potassium metal is 564 nm. what is its work? what is the kinetic energy of electrons ejected if radiation of wavelength 410 nm is used?
Define color band corresponds to the largest energy : which observed color band corresponds to the largest energy difference between levels and which is the smallest?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  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

  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.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  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.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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