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

  Make 2-dimensional array

make 2-dimensional array a bit of life and bringing them from the abstract to the concrete realms

  Write a program to read only one integer number

Write a program to read ONLY one integer number (your input must be one 3 digit number from 100 to 999), and to think of a number as being ABC (where A, B, and C are the 3 digits of a number)

  Create class integerset

Create class IntegerSet for which each object can hold integers in the range 0 through 100. Represent the set internally as a vector of bool values. Element a[i] is true if integer i is in the set. Element a[j] is false if integer j is not in the set..

  Write a program that asks the user to enter the names of 3

Write a program that asks the user to enter the names of three salesmen. The program should thenaccept the sales produced for salesman for each quarter of the year. Display the name, and the totalsales amount, of each salesman.

  Program which asks the user for due date of next assignment

Write a program which asks the user for due date of the next assignment (hours, minutes). Then print number of minutes between the current time and the due date in format.

  Write a for loop that adds the integers

Assume the int variables i , lo , hi , and result have been declared and that lo and hi have been initialized. Write a for loop that adds the integers between lo and hi (inclusive), and stores the result in result .

  Show the deatils of an emplyoee - c programming

Show the deatils of an emplyoee in a neat format.

  Bare in mind this is a program

Bare in mind this is a program with the audience being lawncare and landscaping people. So the events will generally be to know how often a client wants their lawn mowed.

  Implement a simplified version of the set class

You will implement a simplified version of the set class. You must implement all functions defined in the provided file set.h. You may add other member functions and variables as necessary.

  Program to tell you how many months it will take to pay off

write a program to tell you how many months it will take to pay off any loan, as well as the total amount of interest paid over the life of the loan.

  Write a program to convert between rectangular

Write a program to convert between rectangular and cylindrical coordinates, based upon user input. For example, if the user wants to convert cylindrical to rectangular coordinates, the user would input r, ?, z values and the program would output x, y..

  Write a program that accepts as input, without prompts

Write a program that accepts as input, without prompts, a series of short values, terminated by end of file. The program outputs one line:

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