1/8
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
object
a representation of a real world entity (e.g book or car or student)
class
a template for creating objects. Identifies what data needs to be stored (fields) for objects of this type and what methods are available to allow access to this data
types of relationships between objects
dependency (uses)
aggregation (has a)
inheritance (is a)
coupled
two classes that use/reference eachother
why are dependencies bad?
Dependencies increase overhead maintenance. It is desirable for objects to be self-contained (through encapsulation). If an object depends on another class to provide data and useful methods, we must be sure that it is available whenever using the object. It decreases code reuse, which has a negative impact of development speed
integer
used to represent whole numbers. Stored as a 2s complement signed integer so can take values from -231 to 231-1.
Real (double / float in java)
difference between double and float is amount of memory used to store the number. Float uses 32 bits, and double uses 64 bits
string
used to represent a sequence of characters like a name
boolean
used to represent data that can only take two values, e.g true or false, male/female. It occupies 1 bit of data in memory