Answered Essay: This is a C++ problem,all information is here:

This is a C++ problem,all information is here:

Due date: 9/11/2017 CS 101 Project 1 For this project you will read from a file, one line at a time, and process each line as you read it. The file will contain at most 1000 lines, where each line will have 3 values. The file represents a network, and the first two values are strings that are network identifiers and the third value represents the bandwidth available (in Mb/s) from the first identifier to the second identifier The identifiers can appear in the file multiple times, so your first job is to maintain a list of unique identifiers. The identifiers can contain only letters and numbers and are not case sensitive. They should be converted to all caps. You should produce the following output: A list of the unique identifiers from the file, output in the order that they appear in the file, one per line. We will define a leaf node of the network to be an identifier that only appears as a first identifier or one that only appears as a second identifier. For all non-leaf identifiers, output the identifier, the sum of the bandwidth to that identifier, the sum of the bandwidth from that identifier, and the ratio of the to/from as a two decimal point float. Requirements Please carefully read the following requirements . The first command line parameter will be the name of the input file, and the output should go to standard output, ie. using cout. Dont do this wrong! . You should not include libraries other than iostream, fstream, iomanip, and string. You must use Gt+ streams for all I/O . You should store the distinct identifi iers as an array of strings. There will be no more than 1000 distinct identifiers in the input. .You must format your output exadtlyas shown in the example below .You must supply a makefilethat supportsthecommand make and produces an executable named project1 .You must do your own work, you must not share code, youmust submit your project in a zipfile as specified under submission
media%2F945%2F94532f95-155d-4b0a-ba64-d0
Thank you so much

Due date: 9/11/2017 CS 101 Project 1 For this project you will read from a file, one line at a time, and process each line as you read it. The file will contain at most 1000 lines, where each line will have 3 values. The file represents a network, and the first two values are strings that are network identifiers and the third value represents the bandwidth available (in Mb/s) from the first identifier to the second identifier The identifiers can appear in the file multiple times, so your first job is to maintain a list of unique identifiers. The identifiers can contain only letters and numbers and are not case sensitive. They should be converted to all caps. You should produce the following output: A list of the unique identifiers from the file, output in the order that they appear in the file, one per line. We will define a leaf node of the network to be an identifier that only appears as a first identifier or one that only appears as a second identifier. For all non-leaf identifiers, output the identifier, the sum of the bandwidth “to” that identifier, the sum of the bandwidth “from” that identifier, and the ratio of the “to”/”from” as a two decimal point float. Requirements Please carefully read the following requirements . The first command line parameter will be the name of the input file, and the output should go to “standard output”, ie. using cout. Don’t do this wrong! . You should not include libraries other than iostream, fstream, iomanip, and string. You must use Gt+ streams for all I/O . You should store the distinct identifi iers as an array of strings. There will be no more than 1000 distinct identifiers in the input. .You must format your output exadtlyas shown in the example below .You must supply a makefilethat supportsthecommand “make” and produces an executable named project1 .You must do your own work, you must not share code, youmust submit your project in a zipfile as specified under submission

Expert Answer

 

Code:

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main(int nNumberofArgs, char* arrArgs[])
{
if(nNumberofArgs > 1){
string line;
ifstream myfile (arrArgs[1]);
if (myfile.is_open())
{
while ( getline (myfile,line) )
{
string token = line.substr(0, line.find(‘ ‘));
cout << token << ‘n’;
}
myfile.close();
}
else cout << “Unable to open file”;
}
return 0;
}

Output:

Buy Essay
Calculate your paper price
Pages (550 words)
Approximate price: -

Help Me Write My Essay - Reasons:

Best Online Essay Writing Service

We strive to give our customers the best online essay writing experience. We Make sure essays are submitted on time and all the instructions are followed.

Our Writers are Experienced and Professional

Our essay writing service is founded on professional writers who are on stand by to help you any time.

Free Revision Fo all Essays

Sometimes you may require our writers to add on a point to make your essay as customised as possible, we will give you unlimited times to do this. And we will do it for free.

Timely Essay(s)

We understand the frustrations that comes with late essays and our writers are extra careful to not violate this term. Our support team is always engauging our writers to help you have your essay ahead of time.

Customised Essays &100% Confidential

Our Online writing Service has zero torelance for plagiarised papers. We have plagiarism checking tool that generate plagiarism reports just to make sure you are satisfied.

24/7 Customer Support

Our agents are ready to help you around the clock. Please feel free to reach out and enquire about anything.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

HOW OUR ONLINE ESSAY WRITING SERVICE WORKS

Let us write that nagging essay.

STEP 1

Submit Your Essay/Homework Instructions

By clicking on the "PLACE ORDER" button, tell us your requires. Be precise for an accurate customised essay. You may also upload any reading materials where applicable.

STEP 2

Pick A & Writer

Our ordering form will provide you with a list of writers and their feedbacks. At step 2, its time select a writer. Our online agents are on stand by to help you just in case.

STEP 3

Editing (OUR PART)

At this stage, our editor will go through your essay and make sure your writer did meet all the instructions.

STEP 4

Receive your Paper

After Editing, your paper will be sent to you via email.

× How can I help you?