Question: There is a virus file named Sunday.txt , when this file is downloaded to a folder, it begins to check other . txt files

There is a "virus" file named "Sunday.txt", when this file is downloaded to a folder,
it begins to check other .txt files and overwrite the files content. Following are the
code details for simulating this virus propagation.
Create Files with Initial Content:
Create 5 new text files with the content "Monday".
Print Initial Content:
Print the content of each of the 5 text files.
Create and Populate "Sunday.txt":
Create a new text file named "Sunday.txt" with the content "Sunday".
Update Other Files with "Sunday.txt" Content:
For each text file in the current directory:
If the file is not "Sunday.txt":
Overwrite the file's content with the content of
"Sunday.txt".
Print Merged Content:
Print the content of all text files, including "Sunday.txt".
Feel free to write it in Java, Python or any other programming language, turn in
your executable code and output to d2l dropbox. Here is the sample output:
Content of file1.txt: Monday
Content of file2.txt: Monday
Content of file3.txt: Monday
Content of file4.txt: Monday
Content of file5.txt: Monday
Content of all .txt files after updating:
Content of file1.txt: Sunday
Content of file2.txt: Sunday
Content of file3.txt: Sunday
Content of file4.txt: Sunday
Content of file5.txt: Sunday
Content of Sunday.txt: Sunday
 There is a "virus" file named "Sunday.txt", when this file is

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 Databases Questions!