7 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?
We do this typically by placing it on some diagram in the standard box-shaped form.
Report
Which compartments are there in a Class?
First compartment:   Name

Second compartment:  Attribute's compartment 

Third compartment:  Operations compartment
Report
Which compartment in require in all displays o the class?
The name compartment
Report
Why can we omit the attribute compartment?
We can omit from the attribute compartment, any of the attributes if we wish because perhaps only some attributes are relevant to the current view.

If we wind up omitting all the attributes, we might as well even omit the entire attribute compartment for that class from the diagram.
Report
An attribute is typically also a noun, but it is a ...?
An attribute is typically also a noun, but it is a property and usually not an independent entity

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
Report
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
Report
In Fig. 6.1, we depict four views of the same Book class.

What do we see in the second view?
The second view uses an ELLIPSIS (…).

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.
Report
  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart