question archive A watch is being built to measure heart rate

A watch is being built to measure heart rate

Subject:Computer SciencePrice: Bought3

A watch is being built to measure heart rate. The sensors to measure the heart rate are positioned so that they will be over the radial artery. There are five pairs of sensors. Which sensor pair is ideal will depend on the placement of the watch on the person's wrist, and may change as the person moves around.

Assignment:

  • You will need to w rite a program to determine which sensor pair to use. You will need to ask the user to input 6 values representing values received from each sensor pair. (In the real world this is a value supplied by an A/D converter.)
  • Assume that if a sensor has a value between 20 and 120 inclusive, the pair is working well. If there are multiple sensor pairs working well, select the one with the value closest to 70. If none of the pairs are working well, repeat the process (ask for 6 more values and look for the best one.)
  • You MUST use either a stack or a queue to complete this. In addition, you MUST provide an include file to handle the stack of queue as a linked list and another include file to handle the stack of queue as an array. 
  • As you add items to the stack or queue print out the word ADD and the information being stored in the node.
  • As you remove items print out the word REMOVE and the information being removed.
  • Once you have determined which pair is working the best, display a message indicating which pair is the best along with the value received from the sensor pair. The pairs should be numbered 1 through 6. If after 4 attempts, you still have not found a working pair, print out a message saying that the watch is temporarily out of service.
  • Finally, include a comment at the beginning of your code indicating which you chose a stack or a queue and why.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE