A. Introduction
Suppose you are in a large high school and there are 300 students in your class. Even though each of you know your own height, the school administration wants to know the average height of this class and the tallest student.
Similarly, sometimes you might want to find out the average price of all 5-seat SUVs, as well as the most expensive or inexpensive one etc.
This type of problems involves handling a relatively large amount of values in your program. You can not create individual variables to store them. What to do?
B. Watch how to create an array ... ( Slides )
C. Now, please try the following in your IDE and save your project for the following sessions.
Create a double array of 300 elements, name it height.
Is there another way to declare an array? If you print out height[0], what value will be printed? what value is height[2] or height[299]? height[300] ? Try to print all of these and explain why you get what you see.
D. See if you can beat everyone else in this Kahoot! Or see if how many mistakes you can spot in these slides.
E. Feel free to post questions below.