Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!