Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedAssignment
image text in transcribedC # code to manipulate
image text in transcribedInput file to be read
image text in transcribedOutput 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

14.5 Describe how accidents at work can be prevented.

Answered: 1 week ago