Define a utility class for displaying values of type double. Call the class DoubleOut. Include all the methods in the class DollarFormat, all the methods from the class OutputFormat ,….
provide your own terminate function, which takes care of this problem.
1. Use the Time class to provide an overloaded ‘−’. Here the time query is also to be recorded in a ﬁ le. Use C text ﬁ le to store the query. If a calling function provides expression Time1 − Time2, then operator –() function should throw an exception if Time2 is a later time than Time1. Before throwing the exception, though, the operator ‘−’ function should close the ﬁ le.
2. Using Time class, throw an exception when invalid time is input. Write set_terminate() to provide your own terminate function, which takes care of this problem.