Question: Assignment C # code to manipulate Input file to be read Output file should show IP address on the bottom /Users/AM/Downloads/Assignment1.pdf 1) Please read the
Assignment
C # code to manipulate
Input file to be read
Output file should show IP address on the bottom /Users/AM/Downloads/Assignment1.pdf 1) Please read the syllabus and answer as" I have read the syllabus" (50 Points) 2) You will write a program that will read a text file, process it, find the ipv4 number in the package and write it to another text file. "LOGFILE.TXT" and "SamleOUTPUT.TXT" files are given to you. The output of this program or your answer shall be exactly the same as the contents of "SamleOUTPUT.TXT". Please follow these steps: (50 Points) a. (5 Points) Use the given "LOGFILE.TXT i. Open the file in your code using FileStream and StreamReader Classes, ii. As we discussed in the class, StringBuilder Class is designed to store strings effectively and fast so, 1. Create a StringBuilder Object 2. Read everything from the file and store in this object using the Append Method of b. (5 Points) StringBuilder Objects are good at storing effectively but not good at string operations. this object inside a while loop. For example, they don't have Split method that comes with string Class. i. So copy StringBuilder's data to a simple string object, e.x.(String input sb.ToStringO:) c. Create a char array such as (charll h "these are the list of delimiter that will be used to parse the file. d. Create a string array to store the result of parsing.(StringlI p: e. Do the parsing ( p = input.Split(h) f (20 Points) Write a for loop that will check every element in array p and find the ones with the .'s in them. i. For each, you can use lndexof method such as pli].Indexon") !=-1) this means that there is ""in the element. ii. But some elements have dots but not numbers iii. Parse again using 'as the delimiter. iv. Check each parsed element whether it is a number and
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
