Approximate the force exerted by a race car's brakes based on a table of distances traveled at one second intervals. Uses a ObservedFunction class to approximate velocity and deceleration

What will be an ideal response?


```
lass ObservedFunction{
public:
ObservedFunction(){numPoints = 0;}
ObservedFunction(int); // initialize with arrays of given size
void deleteFunction();
void findFirst(ObservedFunction&); // calculate 1st derivatives
void findSecond(ObservedFunction&); // calculate 2nd derivatives
double getValue(int) const; // returns the observed value
private:
int numPoints; // number of points observed
double *observed; // dynamic array of observed points
friend istream& operator>> (istream&, ObservedFunction&);
friend ostream& operator<< (ostream&, const ObservedFunction&);
};

ObservedFunction::ObservedFunction(int points)
{
numPoints = points;
observed = new double[numPoints];
}

void ObservedFunction::deleteFunction()
{
if (numPoints > 0)
delete[] observed;
}

void ObservedFunction::findFirst(ObservedFunction& first)
{

```

Computer Science & Information Technology

You might also like to view...

The Font effect ________ provides the user with Embossed and Engraved options

Fill in the blank(s) with correct word

Computer Science & Information Technology

A key or feature that can be turned on or off is known as a(n) ________ command

Fill in the blank(s) with correct word

Computer Science & Information Technology

To access the Step-by-Step Mail Merge Wizard, click Start Mail Merge on the ____ tab.

A. Home B. Insert C. Mailings D. References

Computer Science & Information Technology

The text between square brackets in an activity diagram represents a(n) ________.

a) decision b) initial state c) action state d) guard condition

Computer Science & Information Technology