Hai everyone! :)
Here my newest post related with the last post which talked about Usecase Diagram. And now I gonna tell you about Class Diagram. Did you ever heard or learn before? Yes or No? Hmm lemme think that you didn't know hahaha lol :p
So, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects. The class diagram is the main building block of object oriented modelling. It is used both for general conceptual modelling of the systematics of the application, and for detailed modelling translating the models into programming code. Class diagrams can also be used for data modeling.The classes in a class diagram represent both the main objects,
interactions in the application and the classes to be programmed.
In the diagram, classes are represented with boxes which contain three parts:
- The top part contains the name of the class
- The middle part contains the attributes of the class
- The bottom part gives the methods or operations the class can take or undertake
In the design of a system, a number of classes are identified and
grouped together in a class diagram which helps to determine the static
relations between those objects. With detailed modelling, the classes of
the conceptual design are often split into a number of subclasses.
In order to further describe the behaviour of systems, these class diagrams can be complemented by state diagram or UML state machine. (taken from Wikipedia here).
Class Diagram for Blog |
Despite the picture above is class diagram for blog. I made the picture based on my last task (you can see in the last post, the title is "Usecase Diagram for Blog"). So, actually the main proses in blog are Manage Profile, Manage Comment, Posting Artikel, Login, Menetizes Blog, Following. And I added the main proses into the "Main" box. Can you found it? Yes, alright :)
After you make a box, then right klik and choose "add Operation" or Ctrl+M and make as well as mine hehe :D
From the main proccess, we should breakdown all the proccess, manage profile, manage comment, posting artikel, following blog, and menetizes blog.
- In Manage profile box there consist of edit porfile and delete profile.
- Manage Comment, consist of input comment and delete comment
- Posting artikel, consist of input artikel, edit artikel and delete artikel
- Following Blog
- Menetizes Blog, consist of Change or edit colour Background, edit position blog, change or edit theme blog, and Change Font
- Top Parts : TbProfile
Middle Part : idProfile, choose string
nama_pengguna --> string
email -----> string
memo ----> string
Bottom Part : setId_Profile
getId_Profile
setNama_Pengguna
getNama_Pengguna - Top Parts : TbComment
Middle Part : isiComment, choose string
tgl_Comment --> date
panjang_Comment----> string
Bottom Part : setIsi_Comment
getIsi_Comment
setTgl_Comment
getTgl_Comment - Top Parts : TbArtikel
Middle Part : isiArtikel, choose string
tgl_PostingArtikel --> date
Bottom Part : setIsi_Artikel
getIsi_Artikel