Question
Spreadsheets can be stored in a format called Comma Separated Values (CSV). The spreadsheet below: Date Item Cost Profit 9/5/18 Bungee 2.49 .42 9/8/18 Light
Spreadsheets can be stored in a format called Comma Separated Values (CSV). The spreadsheet below:
Date | Item | Cost | Profit |
9/5/18 | Bungee | 2.49 | .42 |
9/8/18 | Light | 16.42 | 5.81 |
Would look like this in a CSV file:
Date, Item, Cost, Profit,
9/5/18 , Bungee , 2.49 , .42
9/8/18 , Light , 16.42 , 5.81
CSV files are handy because they can exchange data between applications. For example, we use CSV files to move the grades from Turingscraft and Zyante into Canvas. Notice there is a space both before and after the commas.
Write a few lines of code that will calculate the total profit from the CSV file above.
Scanner keyboard = new Scanner(System.in);
double profit = 0.0;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started