CS 202, Fall 2007 Assignment #3: 10 Points. Due Date: Thursday, 9/27/07. (3) 1. Exercise 9.4. Test your constructor to show that it works right by modifying the constructor definition in Figure 9.2 and rerun Figure 9.3.** (3) 2. Define a non-member friend function for the Time class in Figure 9.1-9.2 called timcmp(t1,t2) which compares two Time objects and returns -1, 0, or +1 according to whether t1 is less than (earlier), equal to, or greater (later) than t2. Modify the driver program in Figure 9.3 to test all 3 cases.** (4) 3. Modify the Simpletron simulator (HW#2, Problem 1) to read and execute SML programs from a text file named "prog.sml". SML program files consist of 4 digit opcodes, one per line. The file is terminated with a line containing the code -99999. Change the welcome message printed by the load() function to print your name and the name of the SML program file and remove the the description of interactive SML input and the '?' prompt. The modified simulator must read and print each opcode to create a listing of the program. The modified simulator must count the input lines, print line numbers before each opcode as the program file is read, and then run the program in the same manner as before. Test your modifications using the SML program in Example 1 (pg 466) run from a file. See Section 17.5 for example programs containing the code needed to open and read a file. Be sure to include an error check for the existence of the input file. Once the file is opened, the name of the file object is used exactly like 'cin' to read data from the file into variables. Turn in the output from the test run along with the commented portions of the simulator source code which were modified.** **For full credit, turn in fully commented program listings, including your name and the problem number, and the output from test runs exactly as it is produced by the program.