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

  Write program which reads n numbers from keyboard

Write down C++ program which reads N numbers (positive, negative, integer and double numbers) from keyboard, computes and shows the following information. Largest number of all numbers entered from keyboard.

  Pros and cons of choosing two servers

Classify the two alternatives in terms of what type of application architecture they use. b. Outline the pros and cons of the two alternatives and make a recommendation to Fred about which is better.

  Write a program that asks the user to enter two numbers.

Starting Out with C++ Write a program that asks the user to enter two numbers.

  C string and two int reference parameters

Write a complete function, not an entire program, that has a C string and two int reference parameters (call them a and b), returning nothing.

  C program to randomly generate more than ten ip address

Write C or C++ program which Randomly generates more than 10 IP addresses written in decimal format and write results in text file (e.g. Dec_IPAddresses.txt)

  Write a function that will take in an array of integers

Write a function that will take in an array of integers, sum up all the values in the array, and return the result to the calling function.

  Write a full program that implements the aggregation concept

Write a full program that implements the aggregation concept for the Mail Message, Header , Body and Attachment classes.

  Implement the delivery company

Implement the delivery company using the classes given in the class diagram above.

  Calculation of mortgage interest rates

Instruction of pointers and the calculation of mortgage interest rates.

  Reads in a list of integers

Write a program in C++ that reads in a list of integers into and array with base type int. Provide the facility to either read this array from the keyboard or from a file, at the user's option. If the user chooses file input, the program should reque..

  Braces for blocks of code

C-- should have braces for blocks of code, an if statement, while statement, and a double, int, and character. Each statement ends with a semi-colon and you must have a main routine

  Write a program that reads in a list of integer numbers and

Write a program that reads in a list of integer numbers and print out the sum of all numbers, the average, the lowest and the highest value entered. The first input number indicates how many numbers the program is attempting to read. For example, if ..

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