CSE 116 Lecture Notes - Lecture 6: Multiset, Quinoa

14 views3 pages

Document Summary

Abstract state what is done, not how it is done. Data access and use collections of data. Type used to organize and define data usage implementation: adts must remain abstract any implementation okay, if it completes methods, could implement an adt with: Collection interface: java interface used by all adts specifies base methods to be implemented by classes these methods define rules for how data is organized usage depends on adt"s specification of method. Clicker question: array is an adt: true, false answer: b. Not possible with multiset using these methods: calling methods to get listing of set"s elements, ordering elements within set for later processing. String b = bob ; ms. add(b); ms. add(b); ms. add( bob ); assertequals(______, ms. size()): 0, 1, 2, 3, 4 answer: d. 3. Methods must work, but can they use any storage: arraylist, almost always use an array.

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