A commercial fruit orchard houses several varieties of apple trees.
Data collected for the trees is stored in parallel lists (arrays).
The data stored is:
The orchard owner wants to present this data to local growers and recommend the best variety of apple tree to plant.
The best variety is defined as having the highest maintenance rating (1) and the largest annual harvest weight per tree among those with that rating.
Write a program to:
tbl_annualHarvest.Your program should function correctly even if the number of varieties represented in the data is changed.
Below is an example of the expected output format:
Fields are: Variety, Rating, Yield (tree), Count, Total (variety)
Bramley 2 45.0 8 360.0
Gala 1 30.5 12 366.0
Fuji 3 50.0 5 250.0
Honeycrisp 1 35.0 10 350.0
Empire 2 28.0 6 168.0
Cox 3 22.0 4 88.0
Pink Lady 1 42.5 6 255.0
Total: 1837.0 kilograms
Recommended variety: Pink Lady rating: 1 yield: 42.5