Subject and Predicate
Surya Prakash Pandey
October 07, 2021
A class model covers the static type structure of the system by defining the objects in the system, the relationships between objects, and the attributes and operations for each class of objects. The class model is one of three very important models. I tend to think of building a system around objects rather than functionality, as an object-oriented system more closely matches the real world and is consequently more flexible with respect to change. Class models provide knowledge of the graphical representation of the system which enables them to communicate with customers.
The main objective of class modeling is to depicting objects. An object is a concept, abstraction, or identifiable thing that means an application. Objects often appear or may use as proper nouns or specific references in problem descriptions and discussions with users. Some objects have real world counterparts, while others are conceptual entities. The choice of objects depends on the decision and the nature of the problem: there may be several correct representations.
All things have their own identity and they are different from each other. Just as there are two mangoes of the same colour, size and still different mangoes, a person may eat one mango and then eat another. Similarly, identical twins are two different individuals, even though they look alike. The term identity means that objects can be distinguished by their inherent existence, and not by the descriptive properties that they may possess.
Here, there is two type of models structure- (i) class diagram and (ii) object diagram.
The class diagram gives a graphical notation for modeling classes and their relationships, to describe all possible objects. Class diagrams are very important for both modeling abstractions and designing real (main) programs.
An object diagram represents all individual objects and their relationships. Object diagrams are helpful for documenting test cases and discussing examples. A class diagram is equivalent to an infinite set of object diagrams.
Value means a piece of data. For example you can get the value by checking the problem documentation. An attribute is a named property of a class that explain about the value held by each object of the class. You can find attributes by looking for adjectives or by abstracting specific values. Structural constructs i.e. class and relationship govern class model. Attributes are not more importent and serve a wide range of classes and relations.
An operation(behaviour) is a function or procedure that can be implemented in a class or by an object in a class. Hire, Fire and Pay Dividend are may be operations on class company. There are open, close, hide, and redisplay operations on the class window. All objects in a class share the same operation.
All operations (behaviors) have a target object as an implicit argument. The behavior of the operation depends on the class of its target. An object "knows" about its class, and hence the correct implementation of operations.
The same operation(behaviors) may apply to many different-different classes. This kind of operation is polymorphic: i.e. the same operation occurs in different forms in different classes. A method is an implementation of an operation for a class. For example, an operation in a class file might be print.
0 Comments