Chapter 7 Lab: Arrays Lab Objectives declare and instantiate arrays fill an array using a for loop access and process data in an array write a sorting method use an array of objects Introduction Everyone is familiar with a list. We make shopping lists, to-do lists, assignment lists, birthday lists, etc. Notice that though there may be many items on the list, we call the list by one name. That is the idea of the array, one name for a list of related items. In this lab, we will work with lists in the form of an array. It will start out simple with a list of numbers. We will learn how to process the contents of an array. We will also explore sorting algorithms, using the selection sort. We will then move onto more complicated arrays, arrays that contain objects. Task #1 Average Class Start a new project in BlueJ. Use your name in the project name. In the project, create a new class called Average according to the UML diagram. This class will allow a user to enter 5 scores into an array. It will then rearrange the data in descending order and calculate the mean for the data set
Get Free Quote!
267 Experts Online