Modeling: What, Then, Is A Model?
Modeling: What, Then, Is A Model?
A model may be
We build models so that we can better understand the system we are developing.
Principles of Modeling
1. The choice of what models to create has a profound influence on how a problem is
attacked and how a solution is shaped:- In software, the models you choose can
greatly affect your world view. If you build a system through the eyes of a database
developer, you will likely focus on entity-relationship models that push behavior into
triggers and stored procedures. If you build a system through the eyes of a
structured analyst, you will likely end up with models that are algorithmic-centric,
with data flowing from process to process. If you build a system through the eyes of
an object-oriented developer, you'll end up with a system whose architecture is
centered around a sea of classes and the patterns of interaction that direct how
those classes work together. Any of these approaches might be right for a given
application and development culture, although experience suggests that the object-
oriented view is superior in crafting resilient architectures, even for systems that
might have a large database or computational element. That fact notwithstanding,
the point is that each world view leads to a different kind of system, with different
costs and benefits.
3. The best models are connected to reality:- In software, the Achilles heel of
structured analysis techniques is the fact that there is a basic disconnect between its
analysis model and the system's design model. Failing to bridge this chasm causes
the system as conceived and the system as built to diverge over time. In object
oriented systems, it is possible to connect all the nearly independent views of a
system into one semantic whole.
Object-Oriented Modeling
Object-oriented modeling (OOM) is the construction of objects using a collection
of objects that contain stored values of the instance variables found within an
object. Unlike models that are record-oriented, object-oriented values are solely
objects.
The object-oriented modeling approach creates the union of the application and
database development and transforms it into a unified data model and language
environment. Object-oriented modeling allows for object identification and
communication while supporting data abstraction, inheritance and encapsulation.
Definition
"Modelling is a central part of all the activities that lead up to the deployment of good
software. We build models to communicate the desired structure and behavior of our
system. We build models to visualize and control the system's architecture. We build
models to better understand the system we are building, often exposing opportunities
for simplification and reuse. And we build models to manage risk."
Example 1:
In the class diagram, a person may own stock in zero or more companies; a company may have
multiple persons owning its stock. The object diagram shows some examples. John, Mary, and
Sue own stock in the GE company. Sue and Alice own stock in the IBM company. Jeff does not
own stock in any company and thus has no link.
Multiplicity(*) specifies the number of instances of one class that may relate to a single
instance of another class.
Multiplicity
Multiplicity specifies the number of instances of one class that may relate to a single instance
of an associated class. Multiplicity constrains the number of related objects. The literature often
describes multiplicity as being “one” or “many,” but more generally it is a (possibly infinite)
subset of the nonnegative integers.
The special symbol “*” is a shorthand notation that denotes “many” (zero or more).
Example 2:-
Each country has one capital city. A capital city administers one country. (In fact, some countries,
such as The Netherlands and Switzerland, have more than one capital city for different purposes.
If this fact were important, the model could be modified by changing the multiplicity or by
providing a separate association for each kind of capital city.)
Example 3:-
A workstation may have one of its windows designated as the console to receive general error
messages. It is possible, however, that no console window exists. (The word “console” on the
diagram is an association end name).