Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Arrays, Loops, Imports, ArrayLists

This lab is dedicated to creating, interacting with and manipulating arrays in Java. Arrays in Java have a fixed size. Arrays are created with a certain size and they never shrink or grow. Java arrays are typed. You can have an array of integers, or an array of strings, but not an array mixed with integers and strings.

Version

1.0.0

Feature Task

5/30/19

Analyzing Weather Data

Use the October Seattle weather data above. Iterate through all of the data to find the min and max values. Use a HashSet of type Integer to keep track of all the unique temperatures seen. Finally, iterate from the min temp to the max temp and print out any temperature not seen during the month.

Tallying Election

Write a function called tally that accepts a List of Strings representing votes and returns one string to show what got the most votes.

5/29/19

Rolling Dice

Write a method called roll that accepts an integer n and rolls a six-sided dice n times. The method should return an array containing the values of the rolls.

Contains Duplicates

Write a method called containsDuplicates that returns true or false depending on whether the array contains duplicate values.

Calculating Averages

Write a method that accepts an array of integers and calculates and returns the average of all the values in the array.

Arrays of Arrays

Given an array of arrays calculate the average value for each array and return the array with the lowest average.

Testing

  • Use JUnit to write at least one test for each of the Feature Tasks. Tests should ensure that each of the methods work correctly.