EECS 40 Lecture 7: EECS 40 - Lec 7

42 views2 pages

Document Summary

Adds the object parameter to the list. remove(int index) Removes the object at the index parameter. remove(object elem. ) Removes this object (if it(cid:23563)s in the arraylist). Returns (cid:23562)true(cid:23563) if there(cid:23563)s a match for the object parameter isempty() Returns (cid:23562)true(cid:23563) if the list has no elements indexof(object elem. ) Returns either the index of the object parameter, or -1 size() Returns the number of elements currently in the list get(int index) Returns the object currently at the index parameter. Dotcombust game: the main() method in the dotcombust class instantiates the. Dotcombust object that does all the game stuff: the dotcombust (game) object instantiates an instance of gamehelper, the object that will help the game do its work, the dotcombust object instantiates an arraylist that will hold the. 3dotcom objects: the dotcombust object creates three dotcom objects (and puts them in the arraylist, the dotcombust object asks the helper object for a location for a.

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 Questions