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.

Could you give me the email address of your teacher/professor?
So I can email him/her the solution and you can continue with whatever you are busy doing and don't have to bother any further.

Comments
Haha...I support .

bro i am not into programming as my field is networking and i need to compualsory study c# in the course. that why i am asking help

READ THE RULES ON DANIWEB.
Show some effort first. Post it and we will try to help. Another option might be: You pay me 100000$ first and I supply you with a solution.

Comments
Haha! even if he is a CEO.

I can give you some resources on how to go about this, although as others have highlighted, it's not our job to be doing your work for you.

Obviously you're going to be dealing with random numbers a fair bit, so read up on this:
http://www.dotnetperls.com/random

and you're going to be dealing with loops as you're filling a file with characters:
http://www.dotnetperls.com/for

I'll get you started, by saying you'll be looping through each of the files and filling them from there with some nested loops, or a similar arrangement.

You really should be taking this more seriously though.
As much as networking may be your field, these programming skills are important, they're not making you do this programming work for no reason.

Best of luck.

Edited 1 Year Ago by humorousone

This article has been dead for over six months. Start a new discussion instead.