You are to design, then write a program that generate five files (vir1.dat, vir2.dat, vir3.dat, vir4,dat, vir5.dat). It creates simulated viruses by outputting a sequence of random characters to the 5 different files. It then also randomly inserts a “VIRUS” keyword in some of the files, at varying rates.
There are three type of virus:
TypeOne - Creates a “.dat” file which is complete clean, and contain NO viruses at all. It just gets filled with random capital letters between the range of A to Z.
TypeTwo - Creates a “.dat” file that is filled randomly with characters from A to Z, but this time it will have a 1/26 chance of the “VIRUS” character sequence being inserted into it. This could be considered a MODERATE threat virus.
TypeThree - Creates a “*.dat” file that is filled randomly with characters from A to Z, but this time it will have a 1/5 chance of the “VIRUS” character sequence being inserted into it. This could be considered a HIGH threat virus.
Each of the five files can be one of the three types file by randomly.
You should display the five files detail on console window or other UI, for example:
Create vir1.dat, the length is 1000, it is HIGH threat virus file.
Create vir2.dat, the length is 1000, it is HIGH threat virus file.
Create vir3.dat, the length is 1000, it is MODERATE threat virus file.
Create vir4.dat, the length is 1000, it is CLEAN file, NO VIRUS.
Create vir5.dat, the length is 1000, it is MODERATE threat virus file.
shahadithyab 0 Newbie Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
tobyITguy commented: Haha...I support . +1
shahadithyab 0 Newbie Poster
tobyITguy 24 Junior Poster
ddanbe commented: Great point. +15
shahadithyab 0 Newbie Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
tobyITguy commented: Haha! even if he is a CEO. +0
humorousone
shahadithyab 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.