These are flashcards an notes made by students on topics like 'objects', 'classes' and 'book', originating from:

- Michael Jesse Chonoles
ISBN-10 0128096403 ISBN-13 9780128096406
1335 Flashcards & Notes
  • This + 400k other summaries, also in PDF!
  • 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

Study Cards on objects, classes, book

What are the most common UML modeling elements on all projects?
Classes
Report
What are the other modeling elements describe?
  • Behavior
  • Internal structure
  • Arrangement
  • Relationships
  • Organization


of one or more classes from various perspectives.
Report
What does the work in the implementation layer?
The Objects
Report
A class might define Library Patron in a system for a library.

We would then say that a Library Patron has the properties (Attributes) of ?
  • Name
  • Physical address
  • e-mail address
  • date of birth
Report
At run time, when we create an instance of Library Patron from the class definition, we have the opportunity to..?
To give values to these attributes field for the instance.
Report
We call the fields that hold the values in the objects....
Slots
Report
Classes can be also thought of as the common denominator to a set description.

In a nonmathematical sense, a set is a collection of elements that have something in common.

Each of the set’s elements is.... ?
objects.
Report
A set of US Presidents, contains the instances of George Washington, Thomas Jefferson, and Abraham Lincoln (among others), with some fields of
  • Name
  • Birthday
  • year elected
  • political party
Report
Each element of the set, that is, each object, would have ..... for those fields.
Each element of the set, that is, each object, would have values for those fields.
Report
A class can also be regarded as a database table with associated field definitions.

Each object would be an instance of a row (also called a record) of the table, with values allowed for each field.

In these cases, each field name indicates an ...?
attribute.
Report
With classes being the fundamental elements in UML and many object-oriented programing languages (OOPL), we need to know how to find the classes that will be useful to create.

To do that properly, we need to identify the things that these classes will be the pattern to make, that is, ...?
the objects.
Report
In some cases, the choice of objects is relatively easy.

By investigating the real world, we can note the relevant real-world objects, usually obvious because we can point to them, manipulate them, and name them.

In a library, each book has properties, such as
  • Name
  • author
  • publisher
  • copyright
  • catalog number
Report
Each book is distinguishable from other books, even if they have identical properties,
for each book has a separate existence for the others.


We can manipulate each book. Each book can
be :
  • borrowed
  • returned
  • recalled
  • destroyed
  • accessioned
  • deaccessioned    
Report
Objects that aren't physical may be harder to identify.Though a process of reification we can look at some persistent relationships as objects also.

What is Reification?
Making somethng a thing
Report
Consider a borrowing, it has a book, a patron, a due date as properties and has its own unique identity, and it can be created or removed.


What could be some features that make for a successful candidate object?
•  Relevant to the problem at hand


•  Can be pointed to, literally or figuratively



•  Crisp boundary/distinguishable from others



•  Has intrinsic identity



•  Has some form of persistence



•  Nameable with a singular noun or noun phrase



•  Has properties, but is not a property itself



•  Has behavior, but is not a behavior itself


•  Can be created, destroyed, or manipulated
Report
Remember that it is always possible to contrive circumstances where apparent violations of the guidelines might make sense.

It is your job as a modeler to ...?
determine if this is one of the rare justifiable cases.
Report
From the sample, exemplar objects we find in the real world or legacy system we can select some relevant ones and group them by commonality by looking at the features that are relevant to our project or domain.

How do we call this natural grouping?
Classes
Report
What could be candidate classes in our Library system?
We might group them into:
  • books
  • videos
  • library cards
  • patrons
  • librarians
Report
"Some people recommend reading the PROBLEM STATEMENT or the REQUIREMENTS of the project and underlining all the nouns and noun phrases, and starting with that list as the candidate objects or classes."

When does this approach works?
This approach might work if you are part of a team working on an entirely new project with no preexisting system or domain experts.
Report
What can be a good start to choose  candidate classes?
Choosing the key nouns in the system description can be a good start.
Report
When we are looking at a collection of exemplar objects, we usually have no problem finding useful classes.

How do we call this process?
This process is called CLASSIFICATION and appears to be innate in humans


  
We know better because these features are not salient in a lending library context.
Somehow, we detect the books and videos do not behave differently in any relevant way depending on their color or the initials of their publisher
Report
The criteria that we gave earlier are still practical.

A good class is a ....?
singular noun and not a mass noun (or noncountable noun.

A class name is usually bold, singular, and beginning with a capital letter.
Report
What must a class and it's objects represent?
A class and its objects must represent things that have a crisp boundary and that are distinguishable from others.
Report
Events are also not good objects and classes.  Give an examplef this.
Consider moments in time: noon, conception, particle decay.

They are not objects; they are not persistent, they are events
Report
Not all noun phrases are good candidates for objects.

For example:
consider that a Reference Book, is a separate subclass of book because it has different behaviors (e.g., it cannot be borrowed) and would be a good candidate, but a Borrowed Book is really a Book that is in the state of being borrowed.

Put this phrase aside for later consideration as a possible state for a book to be in a state machine.
Report
Sometimes the record of an event is necessary to track or manipulate and has properties of its own.

Therefore, despite these being events or operations, we convert them to objects so they can be manipulated, though we probably keep them also in the model as events and as operations.

We mentioned that this was possible with Borrowing.

The process of treating a nonobject as an object is ...?
REIFICATION

Reification is very common when an event or operation creates a persistent relationship between two objects
Report
Reification is very common when an event or operation creates a persistent relationship between two objects.

Give an example of Reification.
A purchase at a supermarket, a marriage, and a person joining the library (becoming a patron) are all events or operations that need to be tracked with objects, of the class of:
Purchase, Marriage, and Membership.
Report
If you find roles that people play in your understanding of the problem, place them aside for later consideration as ...?
Actors in the Use Case diagram.
Report
If there are properties of the roles that need to be tracked, such as fullName, or memberID, this is a sign that...?
these roles should be considered as both classes and actors.
Report
  • Higher grades + faster learning
  • Don't study anything twice
  • 100% sure, 100% understanding
Discover Study Smart