CS 106A Lecture Notes - Lecture 17: Star Wars Day

28 views2 pages

Document Summary

Midterm grades will be out this weekend: assignment averages and midterm curve/ average will also be posted this weekend. May the 4th be with you (star wars day) To swap the values of two variables, you might want to create a temporary variable to store the value of one of the variables. Also when you call a method that accepts parameters and then changes them, the variables in the specific method do not alter the variables in the run method. Value semantics: behavior where values are copied when assigned, passed as parameters, or returned, for int and all primitive objects, those values do not change when they are called into methods and changed unless you return values. When you want to print an array, you need to change it to a string by calling array. tostring() This way, the array works for any number of students. To work this program, read the integer, store it as i, and then array[i]++

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents