Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Computer Science Operating System Implement a program in Java that satisfies the functional requirements listed below (also see the additional requirements for your code described
Computer Science
Operating System
Implement a program in Java that satisfies the functional requirements listed below (also see the additional requirements for your code described for Task 1):
- When the program is started, it attempts to create-a directory titledtest-directory.
- Afterwards, it runs in a loop of500iterations.
- For each iteration of that outer loop, it checks the current timestamp and turns it into a string of the formathour-minute-second-ms(with hyphens between the respective time fields). Then it creates a file titled according to the format "hour-minute-second-ms.txt" (with the previously generated timestamp string)withintest-directory .
- It opens the respective file for writing, and prints the timestamp string within that file10000times (i.e., the resulting file should contain 10000 lines + potentially one final empty line).
- Afterwards, it flushes the file contents, closes the file, and sleeps for 10 ms; this ends the current iteration of the outer loop.
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