CS 106A Lecture Notes - Lecture 1: Iterator

38 views5 pages

Document Summary

Lecture notes hashmaps: tips for yahtzee, 2d array int[][] programscores = new int[1000][7]; I could pull out programscores[0] as a parameter like a 1 dimensional array a. i. a. ii. Remember that programscores[0][0] is a single int a. iii. You cannot pass a column, only pass a row a. iii. 1. a. iii. 2. a. iii. 3. Needs to have player number first then yahtzee score entirescorecard[playernumber][category] Interface: set of methods that provide common functionality, example b. i. Grect and goval are classes that provide all of the methods that are in the: how to implement interface. Public class grect implements gfillable: map interface very important d. i. Key: unique identifier which maps to some value d. ii. Value: data associated with the key d. iii. analogies d. iii. 1. Similar to phone book (string to integer) d. iii. 2. a. You get maps that you can use as interface or maps that you can implement d. iv. 2. d. iv. 3. Key and value may be different types (string and int)

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents