Java Programming

 

     

 

Wednesday, March 18th

 

At this point you should have already submitted the GallonsToLiters program and the 6.1 Vocabulary.
Assignments are due according to their Canvas due date. Also I post what is due on this website. For today the questions 1-6 are due. Assignments can be turned in anytime up until 11:59 PM on the day they are due, after that they are late. If you are having problems with anything let me know.

Review Arrays

Section 6 Lesson 1: Arrays Vocabulary: - copy and past to Canvas - this was due Yesterday!
- The act of progressing through an array
- A structure that stores multiple values of the same data type
- A two-dimensional array.
- An integer that identifies the location of a value in an array
- The ability to pass data into the main function and access it as an element of an array.
- A logical computational procedure that if correctly applied ensures the solution of a problem
- An array of arrays, similar to a table, matrix, or spreadsheet.
- A for loop inside of a for loop
- A named object used to store more than one value.

Begin Section 6 Lesson 1: Arrays slides
Due Today! - Complete Section 6 Lesson 1: Arrays questions 1-6 -Submit to canvas.
Begin Section 6 Lesson 1: Arrays programs - ExamAverage, Matrix

Hints for the ExamAverage program.
In a certain class, there are 5 tests worth 100 points each. Write a program that will take in the 5 tests scores for the user, store the tests scores in an array, and then calculate the students average.

Step 1 - Create an int array (refer to ArrayPractice) that will hold 5 values.
Step 2 - Create a for loop that asks the user to enter five exam scores, one at a time.
Each time the user enters a score assign it to the array variable you created in step 1.
So for the first time through the loop it would look something like this myScores[i] = input.nextInt(); where i is the counter in the loop.
Step 3 - Iterate through the array to pull out each value one at a time and add it to a variable called sum.
You need to add the new value to sum so it will look something like this sum = sum + next array value.
Step 4 - Divide the sum by the number of values to get the average and output the results.
To test your program enter the following scores when the program prompts you:
95, 85, 75, 65, 100 - the average should be 84.

 

Homework

Install Eclipse on your home computer if you would like to be able to work on your java at home.

 

What

In this lesson, you will learn how to:
•Recognize the correct general form of a class
• Create an object of a class
• Describe object references
• Create methods that compile with no errors
• Return a value from a method
• Use parameters in a method

 

Why

Class templates are the foundation of the Java language. Understanding how to create a class with various methods will be essential to becoming a good Java programmer. Knowing how to instantiate an object and compare it to other objects is critical to learning to use and work with Java data types.

 

How

By completing the slides, quiz and practice exercises.