(30) - ICSI201 CHANGE YOUR CLICKER FREQUENCY • Set your...

Info iconThis preview shows pages 1–16. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ICSI201 CHANGE YOUR CLICKER FREQUENCY • Set your clicker to frequency A B • See the back of your clicker for instructions • Do NOT turn your clicker off during class!! • Your votes will not register, if you forget to set your frequency RESET your clicker to frequency AB CSI 201 Study Group RESET CLICKERS TO FREQUENCY A B CSI 201 Introduction to Computer Science [email protected] http://bls.its.albany.edu LI 95j Lecture 30 Administrivia RESET CLICKERS TO FREQUENCY A B Administrivia – Reminders • Labs. – Next Week: NO MONDAY LABS RESET CLICKERS TO FREQUENCY A B Administrivia – Program Five • Programming Assignment Five is available from the class web page. – It is due Monday, before midnight. Today’s Content… Creating Classes This material corresponds to chapter 11 in the text. Creating Classes RESET CLICKERS TO FREQUENCY A B Create a Method Exercise • Create a method (getAverage) that will calculate and return the average of the grades in the grade array – It will return 0 if the grade array is null. – It will return 0 if the grade array length is 0. – Otherwise it will return (the sum of the grades) / (the number of grades). • Add to the toString method a call to this method. • Use the debugger to check that this is working correctly: – Stop in the getAverage method. RESET CLICKERS TO FREQUENCY A B In the getAverage method, what would happen if we didn’t check for a 0 length array and we tried to calculate the average on a 0 length array? A. The method would return a 0. B. Error – pointing to a null array. C.It would return the correct value. D.Error – divide by 0. E. None of the Above. RESET CLICKERS TO FREQUENCY A B In the getAverage method, what would happen if we didn’t check for a 0 length array and we tried to calculate the average on a 0 length array? A. The method would return a 0. B. Error – pointing to a null array. C.It would return the correct value. A.Error – divide by 0. A. None of the Above. RESET CLICKERS TO FREQUENCY A B Accessing Fields from Other Classes • Fields are usually declared to be private – So that code in other classes can’t directly access and change the data. RESET CLICKERS TO FREQUENCY A B Accessing Fields from Other Classes • Try this in the interactions pane Student student1 = new Student("Sue Clark"); System.out.println(student1.name); System....
View Full Document

This note was uploaded on 01/17/2009 for the course CSI 201 taught by Professor Doanne during the Fall '08 term at SUNY Albany.

Page1 / 38

(30) - ICSI201 CHANGE YOUR CLICKER FREQUENCY • Set your...

This preview shows document pages 1 - 16. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online