Use Java 8s Stream and Lambda Expressions to process a CSV f

Use Java 8\'s Stream and Lambda Expressions to process a CSV file. Instructions: The goal of this project is to create a command line program that opens and reads the provided data file (\"Project03Data.csv\") into a List or Array data structure. Then, using Java 8\'s Stream methods finds or calculates the below values. These values should should be displayed to the command prompt. average price of CPU\'s highest priced CPU lowest priced CPU best value CPU (performance / price ) Note that some of data in the CSV file is incomplete and has a NA listed for price. Your program will need to exclude these CPU\'s from consideration. Example: Note that different input data was utilized - your results will be different. Project03Data.csv CPU Name Performance Price (USD) Intel Core i7-3770K @ 3.50GHz 9,556 $560.50 Intel Core i7-3770 @ 3.40GHz 9,327 $335.55 Intel Core i7-3820 @ 3.60GHz 8,990 $404.38 AMD FX-8350 Eight-Core 8,940 $149.99 Intel Core i7-2600K @ 3.40GHz 8,501 $379.97 Intel Core i7-2600 @ 3.40GHz 8,242 $214.99 Intel Core i7-4720HQ @ 2.60GHz 8,046 NA AMD FX-8320 Eight-Core 8,008 $145.99 Intel Core i7-6700HQ @ 2.60GHz 7,997 $1 509 Intel Core i7-4710HQ @ 2.50GHz 7,826 NA Intel Core i5-6600K @ 3.50GHz 7,762 $239.99 Intel Core i7-4700HQ @ 2.40GHz 7,754 $383.00 Intel Core i7-4700MQ @ 2.40GHz 7,736 $467.40 Intel Core i5-4690K @ 3.50GHz 7,690 $239.99 AMD FX-8150 Eight-Core 7,619 $165.99 Intel Core i7-3630QM @ 2.40GHz 7,604 $304.49 Intel Core i5-4670K @ 3.40GHz 7,598 $249.99 Intel Core i5-4690 @ 3.50GHz 7,542 $224.99 Intel Core i7-3610QM @ 2.30GHz 7,460 $399.99 Intel Core i5-4670 @ 3.40GHz 7,342 $226.99 Intel Core i5-4590 @ 3.30GHz 7,174 $199.99 Intel Core i7-4702MQ @ 2.20GHz 7,146 NA Intel Core i5-3570K @ 3.40GHz 7,130 $477.23

Solution

#include <iostream>
#include <cstdlib>
#include <string>
#include \"String.h\"
using namespace std;
int main (int argc, char **argv)
{
//Testing Default constructor, length, and print
String one;
cout << \"The length of String one is: \" << one.length() << endl;
cout << \"The value of String one is: \";
one.print();
  
//Testing Alternate constructor, length, and print
char test[256] = \"Hello world\";
String two(test);
cout << \"The length of String two is: \" << two.length() << endl;
cout << \"The value of String two is: \";
two.print();
  
//Testing the overloaded [] operator. This replaces your at() function.
cout << \"The first letter is: \" << two[0] << endl;
  
return 0;
}

Use Java 8\'s Stream and Lambda Expressions to process a CSV file. Instructions: The goal of this project is to create a command line program that opens and rea

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site