This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CountLT.cpp | |
//Aryelle Young | |
//Sep 23 2014 | |
//Defines the CountLT class | |
#include "CountLT.h" | |
//Default Constructor | |
//takes a value from client code to use as initial bound | |
CountLT::CountLT(double bound) : the_bound(bound), count(0) |