Question
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
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 doesnt exist (e.g., first time to run the program), store 1 in the newly created file. You will use binary IO (FileInputStream / FileOutputSteam) for your code. For this question, you will also need to declare the checked exceptions in the methods 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 download the HexEditor plugin to enable the Hex view. Please submit your count.dat file as well as the java file for this question
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started