COMP SCI 300 Lecture Notes - Lecture 7: Dynamic Array, Bob The Builder

66 views5 pages

Document Summary

Lecture 7: object, instance, specific object, bob the builder, class, blueprint, type, cartoon character, interfaces, object. Instantiation: class aka data structure implementation tells you how its done, interface aka abstarct data type. No code: parts of an abstract data type(adt, set of method declarations, construct that says! A group of items that share properties: related terms. Arraylist: what operations can you do on a collection? (which are fundamentals?) Add isempty(any collection we make/use will have this, but not fundamental) Get an items value(not fundamental might have secret value collections) Set an items value(not fundamental might have secret value collections: bag, concept. Ideally, because its so simple, it is also be tested: operations. Run out of space: designing an integer bag adt, concept. Public interface integer bag adt { void add(integer item); Integer remove();//make sure to check for emptiness before removing. Boolean isempty(): using an integer bag adt. ; //creates a new instance of come intbagadt implementation for(int x=0; x<100;x++){ bag. add(x)

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