Objects and Classes - Finding Objects and Classes - Attributes
7 important questions on Objects and Classes - Finding Objects and Classes - Attributes
When we find a class that we like, we place it in our model.
In what form do we do this?
Which compartments are there in a Class?
Second compartment: Attribute's compartment
Third compartment: Operations compartment
Which compartment in require in all displays o the class?
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding
Why can we omit the attribute compartment?
If we wind up omitting all the attributes, we might as well even omit the entire attribute compartment for that class from the diagram.
An attribute is typically also a noun, but it is a ...?
For example:
the copyright year is not an independent thing, it is a property of a book.
These properties are things that you could imagine asking an instance for the current value
In Fig. 6.1, we depict four views of the same Book class. .
What does the first view show?
- he first view shows four attributes (title, author, year, and accessionNo).
- Attributes generally start with a lower-case letter.
Each of these attributes is typed either as a String or as an Integer.
The TYPE follows the attribute name and usually begins with an initial capital. If the type appears, the “:” is required to precede the type name for parsing
- The TYPE follows the attribute name and usually begins with an initial capital. If the type appears, the “:” is required to precede the type name for parsing
In Fig. 6.1, we depict four views of the same Book class.
What do we see in the second view?
This is an explicit mark that there is at least one elided item.
I call it the Nah-Nah symbol because it teases that we have something in the model that we are not going to show you here.
When the … appears, it must be the last or only item in the list.
The question on the page originate from the summary of the following study material:
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding