UML Design Basics -part 2-

In this article, I will cover what Generalization is, Object Diagrams, Association Vs Generalization, Tips about identifying and specifying valid associations, identifying generalizations, and in general. If you haven’t read Part 1 you can read it here.

5. Generalizations:

A generalization is a taxonomic relationship which used to arrange classes into inheritance hierarchies. look at figure -1-

figure -1-

NOTE:

Generalizations are implemented using the extends keyword

Object Diagram Vs Class Diagram

Object Diagram shows an example of the configuration of objects that may ever exist at a particular point during the execution of the program.

A class Diagram is an abstract representation of all instances of two classes that can ever exist.

Therefore, Object Diagram is generated by a Class Diagram, and Class Diagram can generate an infinite number of Object Diagram.

Class Vs Object

The class name is underlined and precedes by a colon: Human,
Nabeel: Human,
is an example of the object named Nabeel of the class Human. And you can omit the class as Nabeel:

Associations Vs Generalization

An association describes a relationship that will exist between instances at runtime.

A generalization describes a relationship between classes in a class diagram.

Tips about :

1. Identifying and specifying valid associations

To figure out if a relationship should exist or not, Ask yourself if one class controls, is connected to, is related to, is a part of, has as parts, is a member of another class.

Be aware, representing actions as if they were associations is a common mistake. DO NOT DO IT

2. Identifying generalizations

There are two ways to identify generalizations: bottom-up and top-down. The top-down approach divides up a complex class, creating new subclasses. whereas the bottom-up approach is several classes that have operations, attributes, or associations in common then you create a superclass for them. Generalizations are implemented using the extends keyword,

3. general

a. Use meaningful names in
I. Class name e.g Class Human has an attribute called name, not na or even names. (An attribute should not have a plural name).

II. Method name e.g getJobTittle(), not getjobtittle()

b. Obey the language standards e.g className, not ClassName.

and More… I recommended searching for more.

Finally |

Creating a good class diagram takes time And because of that Always remember practice makes you perfect. Stay tuned!

--

--

--

Hunger for Knowledge, adventure, and risk enthusiastic. Software engineering student

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Configuration Providers in .NET

Multi Version Kubernetes CI Pipeline for Atlassian Jira Server & Data Center Apps

TDD Inside-Out vs Outside-In

For book publishers and non-profits with conferences canceled due to COVID-19, we’re making the…

Our Experience Contributing To The Cartography Open Source Project

How to Work with Docker? — Part 2 - Networking & Volumes

Beginners guide to learning GUI programming using PyQT/PySide(Part-2)

OpenLaw’s Latest Language Release Improves Aliases and a Sneak Peek into Contract Collections and…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Hadeel Salah

Hadeel Salah

Hunger for Knowledge, adventure, and risk enthusiastic. Software engineering student

More from Medium

Check and Mate

How to make Code Review more effective with Pair Programming

A journey from UI/UX to responsive code

Test Driven Development: an opinion