Cthulhu helps Kyrat

Tags

Kyrat's economy has been devastated by mismanagement and civil war. The Golden Path rebels have defeated King Pagan Min, and are seeking investment from the West.

Our pal Cthulhu steps (slithers?) forward. It opens a chain of stores selling goats and chickens.

Goat Chickens

Sold in Cthulhu's Kyrati stores

Two stores are in northern Kyrat, and three stores are in the south. The daily sales from the northern stores are in one CSV file. Sales from the southern stores are in another CSV file.

Write a program that reads both CSV files, and makes a combined report. The worksheet starts out like this:

Start

Cthulhu keeps changing the names of the stores, so they need to be read from the files each day. The file names can change, too, so they need to be read from the worksheet.

Here's a sample file for the south:

  • "Banapur Supplies",8,8
  • "Shanath Overstock",21,31
  • "Ajay's Animonculory",14,15

The first field is the store name. The second is the goat sales. The third is the chicken sales.

The file for the north is the same format, just fewer lines:

  • "Rohan Farm Friends",13,7
  • "Jalendu Joy Shop", 19, 23

You can copy-and-paste this data to make your own CSV files.

When the user clicks the Run button, the program reads the files, shows the data, and the totals. Like this:

Output

Upload your workbook. The usual coding standards apply.

Attachments
Where referenced