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, what value will be printed? what value is height or height? height ? Try to print all of these and explain why you get what you see.
E. Feel free to post questions below.