[CMPSC 122] - Midterm Exam Guide - Everything you need to know! (24 pages long)

271 views24 pages

Document Summary

Assignment statements associate an identifier (name) with an object. Identifiers can not begin with a numeral. Create alias by assigning a second identifier to an existing object. Changing the value of one identifier will break the alias. But, changes made to one alias will be apparent on the other. Instantiation often requires invoking a constructor, but many built-in classes support literal instantiation. Accessors are methods that return state info but do not modify an object. Mutators or update methods change the state of an object. Immutable: each object of the class has a fixed value upon instantiation. Float is immutable, but the identifier can be assigned to a different value. Bool class used in logic, true or false values. Stores a sequence of references to its elements. A tuple of length one is denoted (12,) Multi line start and end with "" or . Optimized method for checking whether a specific element is contained in the set.

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

Related Documents