Title Printing Table of Medal Winner Counts with Row Totals
Catalog Type SLCItem
Persistent ID https://acos.cs.vt.edu/html/acos-pcex/acos-pcex-examples/Printing_Table_of_Medal_Winner_Counts_with_Row_Totals__64b83d96be16da08fbbd5670?index=0
Platform Name PCEX
Features
Description Assume that we have an array of countries that stores the names of the seven countries that participated in the Skating competitions at the Winter Olympic. We also have a 7x3 matrix that stores the number of medals that these seven countries won. This matrix looks like as follows: { {1, 0, 1 }, { 1, 1, 0 }, ...} The first, second, and third numbers within a row i represent the number of Gold, Silver, and Bronze medals won by the country that is at the index i of the array of countries. Construct a program that takes this matrix and the array of countries, and prints a table of medal counts with row total that shows the number of Gold, Silver, Bronze, and Total medals for each of the countries that participated in the competition. The output table should look like as follows: Country Gold Silver Bronze Total Canada 1 0 1 2 China 1 1 0 2 ...
Keywords
Author Mohammad Hassany
Institution University of Pittsburgh
Iframe URL https://acos.cs.vt.edu/html/acos-pcex/acos-pcex-examples/Printing_Table_of_Medal_Winner_Counts_with_Row_Totals__64b83d96be16da08fbbd5670?index=0
Protocol SPLICE
Protocol URL
License MIT
Programming Language JAVA
Natural Language en

Preview

SPLICE Output