Write a data type Interval that implements the following API: An interval is defined to be the

Question:

Write a data type Interval that implements the following API:

image text in transcribed

An interval is defined to be the set of all points on the line greater than or equal to min and less than or equal to max. In particular, an interval with max less than min is empty. Write a client that is a filter that takes a floating-point command-line argument \(x\) and prints all of the intervals on standard input (each defined by a pair of double values) that contain \(x\).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: