lab14e - 8 - 4 9 - 1 A+ Computer Science Arrays -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Lab Goal : This lab was designed to teach you how to use an array. Lab Description : Take a list of numbers that range in value from 0 to 9 and output how many occurrences of each number exist. Sample Data : 1 5 3 4 5 5 5 4 3 2 5 5 5 3 2 3 4 5 6 7 8 9 0 2 3 5 6 8 8 8 9 4 5 2 3 4 5 6 7 8 2 0 2 3 5 6 8 8 8 9 4 5 Sample Output : 0 - 0 1 - 1 2 - 1 3 - 3 4 - 2 5 - 7 6 - 0 7 - 0 8 - 0 9 - 0 0 - 1 1 - 0 2 - 2 3 - 2 4 - 2 5 - 3 6 - 2 7 - 1 8 - 4 9 - 2 0 - 1 1 - 0 2 - 3 3 - 2 4 - 2 5 - 3 6 - 2 7 - 1
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 8 - 4 9 - 1 A+ Computer Science Arrays - www.apluscompsci.com algorithm help //instance variable int numCount; //code in the set method //size the array numCount = new int[10]; //get a number number = chopper.nextInt(); //bumps up count by one numCount[number] = numCount[number]+1; Computer Science I Lab 14E - HISTOGRAM Lab Value - 100 Files Needed :: Histogram.java Lab14e.java...
View Full Document

Ask a homework question - tutors are online