Project #41288 - Binary and vectors

Background Searching is a common task. One version of this task is to find an item stored in a container. The task can often be simplified or sped up by organizing the items in the container. Task Given a sorted vector of doubles and upper and lower bounds, count the number of doubles in the vector that lie between the bounds. Requirements Write a C++ program that Accepts a file name from the user Reads the numbers in that file and stores them in a vector Checks the numbers in the vector to ensure that they are sorted Accepts a file name from the user Reads pairs of numbers, lower bound and upper bound, from that file one pair at a time For each pair of bounds **Calculates the between bounds count: the number of doubles in the vector that lie between the bounds Reports the bounds and the between bounds count Reports the pair of bounds with the largest between bounds count ** Use two functions to calculate the between bounds count. findGT uses the binary search process to find the first item in a sorted vector that is greater than a target value findGE uses the binary search process to find the first item in a sorted vector that is greater than or equal to a target value Production Run I will provide two files for a production run. One file will contain a large sequence of numbers that can be read as C++ doubles. The numbers will be separated by whitespace. The last number may be followed by whitespace. The other file will contain pairs of numbers, readable as C++ doubles, one pair per line. Execute your code with these two files as input. Submit to WyoCourses Your code A description of tests you ran to verify that your code is correct. The output from the production run

Subject Computer
Due By (Pacific Time) 09/26/2014 09:00 pm
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy