Professional Documents
Culture Documents
E05 BinaryIO Ch17
E05 BinaryIO Ch17
Q2. Repeat (c) above after changing your method to return four statistical values: maximum, minimum,
sum, and average. You have to think of a way so that your method can return all these values in
one return statement. Call your method in main and print out all the four statistical values.
Q3. One way to track how many times a program is executed is to store an integer value in a file, and
every time the program is executed we read that value, increment it, and then save it back to the
file. Write a method that performs this function. Test your method by writing a simple HelloWorld
program that also prints how many times the program has been executed so far.