Overview:In this taskI will analyse what a UML class diagram is as well as what the main elementsare that that come together to constitute a class diagram, e.g. Attributes,operations and relationships between classes.
I will also examine the purpose aclass diagram serves and explain what team members in the software developmentlife cycle (SLDC) uses them. For this assignment I will be using Visualparadigm to develop a java class diagram and note the steps involved. Assignment:A classdiagram is a type of structure diagram which is used to illustrate what must bepresent in the system currently being modelled. Class diagrams help to separatethe design elements from the coding of the system. Classes are often referredto as “the building block of objects” in object-oriented programming, ergo,class diagrams are also the building blocks of UML. They have a number or benefits, allowing usersto:· Illustratedata models for complex systems, no matter how complicated or simple.· Betterunderstand the general overview of the design of an application.
· Visuallyshow any particular needs of a system and distribute that informationthroughout the business.· Createdetailed charts that highlight any specific code needed to be programmed andimplemented to the described structure.· Providean implementation-independent description of types used in a system that arelater passed between its components. *(1)A “class” is a rectangular shape containing three areas stackedvertically. To demonstrate this I opened visual paradigm and started a newproject as shown in the image below. I entered the name of the project as Task 6and selected UML as the data type set.
Although I had the option to, I chosenot to put in a description for my class diagram. I then chose “class-diagram”as the type of diagram I wished to create. My next step was to create two classes in visual paradigm andassign an attribute with getter and setter to it, which is shown in the fourthscreenshot below. An attribute defines values that can be attached to instancesof the class. I am also able to add operations to classes which is a method orfunction that can be performed by an instance of a class. Classes can also havea number of special relationships between each other. Dependancy is aconnection between two or more classes itexists between two elements if changes to the definition of one element (theserver or target) may cause changes to the other (the client or source).
Thisassociation is uni-directional. An “association” represents a group oflinks. An association can link any number of classes.
An association with threelinks is called a ternary association. Associations can be named as well asgiven role name, ownership indicators, multiplicity and visibility. Finally, togenerate java code from the class diagram I have shown thus far in visualparadigm I navigate to the tools tab, select code and the select “generate javacode” which will convert my class diagram into useable java code.