Sponsored Link:
UML Diagrams
UML is a graphical language for visualization, description of parameters, construction and documentation of various systems (programs in particular). Based on the UML technology, a single information model is built.
UML class diagram is used to represent the static structure of the system model in the terminology of the classes of object-oriented programming. The class diagram can reflect, in particular, various relationships between individual entities of the domain, such as objects and subsystems, and also describes their internal structure (fields, methods ...) and types of relationships (inheritance, implementation of interfaces ...). From this point of view, the class diagram is a further development of the conceptual model of the designed system.
Chess Game
The hierarchy of the Chess game is displayed in the UML diagram. The different types of chess pieces naturally form an "is-a" relationship with the abstract class Piece. The derived classes are Pawn, Knight, Bishop, Rook, Queen, King, and Blank. The Blank class is the placeholder for a square on the chess board that is empty. The pieces hold a pointer to the square they are on. The Square class was a means of communication between all of the pieces and the board as a whole. Gameplay drove the creation of all the necessary objects (e.g. the squares, pieces, and players) and monitored critical game events, such as checkmate. The abstract class Player gave rise to two sub-classes: Human and Computer. Though the AI has not yet been implemented, these two derived classes allow for an easy integration of an AI in the future.
Online Shop Class Diagrams
The class diagram is, so to speak, the heart and soul of the object-oriented system. In this manual, the goal is only to demonstrate the capabilities of static modeling as applied to the class model. In the classes have not yet introduced any new operations. Operations belong to the design stage rather than analysis.
Here we provide an example of UML class diagram which shows a domain model for online shopping. The purpose of the diagram is to introduce some common terms, "dictionary" for online shopping - Customer, Web User, Account, Shopping Cart, Product, Order, Payment, etc. and relationships between. It could be used as a common ground between business analysts and software developers.
Sponsored Link: