What is a class?
A class is the construction plan for a set of similar objects in a system. Examples are “student”, “employed” and “bicycle”.
Finish the sentence: “Objects represent the concrete forms of classes and are referred to as their…”
Instances. Each object forms an instance of a class.
If an attribute represents a block of text, what data type should we define in code?
String
If an attribute represents whole numbers with no decimal points, what data type should we define in code?
(int), meaning an integer.
If an attribute represents numbers with decimal points, what data type should we define in code?
Float, or double in Java. Integers can’t represent decimal point numbers, thus float is used.
What does the keyword “default” indicate?
That an attribute has a default value or expression, specified by the user. For example, a default password until it is changed by the user.
What does it mean if an attribute is followed by {readOnly}?
This value can not be changed once it has been initialized. For example, a social security number should be {readOnly}.
What does the forward slash here indicate: /age
It means that age is derived from another attribute. In this example, age could be derived from date of birth, which is then used to calculate the age of the object.