Question: (15 marks) Write a Java program to track how many times the program has been executed. You will store the number (integer)representing the count into

(15 marks) Write a Java program to track how many times the program has been executed. You will store the number (integer)representing the count into a file (count.dat). If the count.dat doesn't exist (e.g., first time to run the program), store 1 in the newly created file. You will use binary IO (FilelnputStream FileOutputSteam) for your code. For this question, you will also need to declare the checked exceptions in the method's header to handle errors. Since the counter.dat file is a binary file (you cannot read it with your typical text editor(eg MS words), you can use your Hex viewer method program from the following question to open the file to examine the contents. If you are using notepad++, you can also d ownload the HexEditor plugin to enable the Hex view. Please submit your count.dat file as well as the java file for this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
