OBSERVATION RECORD Student 1 Do Hoang Nhan Description of activity undertaken - Design and build class diagrams using a UML tool: 50%Assessment & grading criteria How the activity meets
INTRODUCTION
Recently, we joined a so ware development company to improve the poor documenta on of internal so ware libraries This situa on makes it di cult to use so ware code in projects My role is to e ec vely represent UML diagrams in OODA and design pa erns to reduce this situa on UML diagrams in OODA help capture the structure and func onality of the so ware, while design pa erns take advantage of proven solu ons This helps improve documenta on and more e cient use of so ware code, while increasing reliability and saving the company me In this essay I will present the characteris cs of the object-oriented model as well as various class rela onships and build class models using UML tools.
CONTENT
Examine the characteristics of the object-orientated paradigm as well as the various class relationships (P1) 9 A Object-orientated paradigm
The main goal of OOP is to model data and behaviour as "objects," which are derived from "classes." These objects have a ributes (their state) and methods (their ac vi es), re ec ng actual or abstract things Classes (object blueprints), objects (class instances), inheritance (crea ng new classes from exis ng ones), polymorphism ( exible method func onali es across types), encapsula on (preven ng unauthorized access to object data), and abstrac on (hiding intricate details) are important OOP principles OOP encourages modular and adap ve so ware design that re ects real-world dynamics through these concepts [1] b Example: class, object, properties, method, constructor
1 Class: A class is a model or prototype from which new objects can be made Consider a class called "Book" in the context of a library This course doesn't count as a book because it doesn't de ne what a book is
Consider a set of house's architectural plans, for instance Despite not being the actual house, these designs describe its structure
2 Object: A par cular instance of a class cons tutes an object It follows the guidelines the class gave
Example: "Several houses can be constructed using the architectural plans Every house is a thing Despite sharing the same designs, every house may have a di erent color scheme or garden design
3 Properties (or Attributes): These are particular pieces of informa on that
Figure 2 Object Example specify an object's status or features
Such as: "For a speci c house (object) built from the plans (class), its proper es might include its color, the number of oors, or the type of roo ng it has."
4 Method: The ac ons or behaviors that an object can carry out are referred to as methods
As an illustra on, consider the ac ons "open door," "close window," or "turn on light" in a home A "Book" might have methods to "open," "close," or "bookmark a page" in a similar way
5 Constructor: When an object is formed, this par cular method within a class ini alizes or sets it up
A founda on must be laid, walls must be built, and the roof must be placed, for instance, when a house is originally being constructed When a new book object is produced, the constructor of our 'Book' class may set the tle, author, and number of pages
Modularity: OOP supports modular design, which enables independent development and maintenance of various program parts, hence enabling scalability and maintainability
Reuse: The DRY (Don't Repeat Yourself) philosophy is supported by the ability to reuse code through inheritance and composi on
Maintainability: Because OOP systems are modular in design, they are typically simpler to expand, change, and debug
OOP is frequently regarded as intui ve since it replicates real-world en es and interactions
Flexibility: Because methods may be implemented di erently for many subclasses in large-scale applica ons, polymorphism allows for exibility in how they are invoked
Complexity: Adding more classes and objects might make the program more di cult, which is a drawback of OOP
Performance: Procedural programming may not have overhead that OOP can bring (such as method calls or keeping object metadata)
Steep Learning Curve: At rst, beginners may nd it di cult to understand the fundamentals of OOP
Overhead: Since objects store addi onal data like method and property metadata, they may use more memory
Not always appropriate: Not all issues are amenable to object-oriented xes Func onal or procedural solu ons may occasionally be more e ec ve [2]
Principles or characteristics of OOP
What are the Class Diagrams
Class diagrams, a component of the Uni ed Modeling Language (UML) employed in the eld of so ware engineering, serve as visual tools for depic ng the arrangement and associa ons among classes in a system or applica on These diagrams are crucial in the realm of object-oriented design, aiding both developers and stakeholders in comprehending the structure of a so ware system Typically u lized in the design and analysis stages of so ware development, class diagrams play a pivotal role in the so ware development process [6]
Relationships in Class Diagrams
Association: Associa ons represent a connec on between classes and are o en used to express a "has-a" rela onship They can be one- -one, one- -many, or to to many-to-many [7]
Aggrega on: Aggrega on represents a part-whole rela onship, where one class is part of another class It is o en used to express a "has-a" rela onship, but with a weaker associa on [7]
Composition: Composi on is a stronger form of aggrega on, indica ng that the part's existence depends on the whole In a composi on rela onship, if the whole class is destroyed, the part class is also destroyed [7]
Inheritance (Generalization): Inheritance rela onships depict an "is-a" rela onship They show that one class (the subclass or derived class) inherits a ributes and methods from another class (the superclass or base class) This rela onship is used for modeling hierarchical structures [7]
Dependency: Dependency represents a rela onship in which one class relies on another class in some way It is typically shown as a dashed line with an arrow poin ng from the dependent class to the class it depends on Dependencies may be temporary or weak connec ons between classes [7]
Realization: Realiza on is used to show that a class implements the opera ons or methods speci ed by an interface It's a rela onship between a class and an interface, indica ng that the class provides concrete implementa ons for the methods declared in the interface.[7]
Multiplicity: Mul plicity indicates the number of instances of one class related to instances of another class in an associa on It is o en expressed using numerical ranges specifying how many objects are involved in the rela onship [7]
Association Classes: In some cases, associa ons themselves can have a ributes and methods associated with them These are represented as associa on classes, which are classes connected to the associa on rela onship [7]
Introducing some class diagram tools
UML Class Diagram: UML Class Diagram helps you represent classes, proper es, methods, and rela onships between classes This helps you see the overall structure of the system and be er understand the objects and their interac ons
Visual Paradigm class diagram tool: Visual Paradigm is a popular modeling tool that allows you to create and manage class diagrams You can use this tool to create classes, proper es, methods, and rela onships between classes
Astah: Astah is a so ware design and modeling tool similar to Visual Paradigm You can use Astah to create class diagrams, sequence diagrams, ac vity diagrams, and many other types of diagrams
Visual Studio Class Diagram Tool: Visual Studio uses a built-in tool to create class diagrams Visual Studio provides a graphical class designer that allows you to create classes, proper es, and methods
Draw.io: An online tool for crea ng and edi ng diagrams with an easy- -use to interface It provides many drawing and forma ng tools for you to create diagrams as you like [8]
Use the apply tool to draw the class diagram
I use draw.io it is a free and open- urce diagramming tool that supports class so diagrams among other diagram types This is a web-based applica on with a simple interface that makes it easy to create and customize class diagrams draw.io also o ers integra on with various cloud storage pla orms
Class Diagram for Employee system management
The Employee management interface of this system is where I can display, search, add, edit and delete informa on related to employees Key en es such as Role, Jobs, Person, Fullname, Employee, and Address play an important role in the process of managing and maintaining employee informa on
This interface provides the ability to control and perform necessary human resources management tasks, including viewing informa on, searching, adding new employees, edi ng informa on and dele ng
Role and Jobs: Helps manage employee roles and jobs in the organiza on Person and Fullname: Process employee personal informa on, including full name and related informa on
Employee: Represents general informa on of employees in the system Address: Manage the employee's residen al address
Integrating relevant entities into the class diagram provides a comprehensive overview of system interactions, facilitating efficient employee information management The management interface enables comprehensive tracking and administration of personnel data, encompassing roles, job assignments, personal details, and residential addresses This centralized system streamlines human resource management processes, enhancing effectiveness and user-friendliness.
Explain the functions of the system
CONCLUSION
In conclusion, the adop on of UML diagrams in the context of Object-Oriented Design and the incorpora on of design pa erns o er promising solu ons to rec fy the inadequacies in our so ware documenta on By understanding the core tenets of the object-oriented paradigm and class rela onships and mastering the art of cra ing e ec ve class diagrams, we are poised to signi cantly enhance our so ware development processes This will not only lead to more reliable and e cient so ware but also contribute to time and resource savings for our company.
REFERENCES
[1] Gillis, A.S and Lewis, S (2021) What is object-oriented programming (OOP)?, App Architecture Available at: h ps://www.techtarget.com/searchapparchitecture/de ni on/object-oriented- programming-OOP (Accessed: 04 November 2023)
[2] Social Learning Network (no date) Krayonnz Available at: h ps://www.krayonnz.com/user/doubts/detail/61cf0bf6d873e800403a059d/what-are-the-advantages- and-disadvantages-of-OOP (Accessed: 04 November 2023)
[3] Janssen, T (2023) OOP concept for beginners: What is encapsula on, Stackify Available at: h ps://stackify.com/oop-concept-for-beginners-what-is-encapsula on/ (Accessed: 04 November 2023)
[4] Basic principles of object-oriented programming (no date) ParTech Available at: h ps://www.partech.nl/en/publica ons/2020/10/basic-principles-of-object-oriented-programming (Accessed: 04 November 2023)
[5] Gillis, A.S and Lewis, S (2021a) What is object-oriented programming (OOP)?, App Architecture Available at: h ps://www.techtarget.com/searchapparchitecture/de ni on/object-oriented- programming-OOP (Accessed: 04 November 2023)
[6] (No date) What is class diagram? Available at: h ps://www.visual-paradigm.com/guide/uml-uni ed- modeling-language/what-is-class-diagram/ (Accessed: 04 November 2023)
[7] Admin (2023) What are the six types of rela onships in UML class diagrams?, Visual Paradigm Blog Available at: h ps://blog.visual-paradigm.com/what-are-the-six-types- -rela onships-in-uml-class-of diagrams/ (Accessed: 04 November 2023)
[8] Introduc on to class diagrams (no date a) Lucidchart Available at: h ps://www.lucidchart.com/blog/introduc on-to-class-diagrams (Accessed: 04 November 2023)
[9] Tuấn, L.Q (2023) Tìm Hiểu VỀ Cách thiết KẾ class diagram, Viblo Available at: h ps://viblo.asia/p/ m-hieu- -cach-thiet-ve ke-class-diagram-L4x5xLyY5BM (Accessed: 04 November 2023)
[10] Introduc on to visual studio (2023) GeeksforGeeks Available at: h ps://www.geeksforgeeks.org/introduc on-to-visual-studio/ (Accessed: 04 November 2023)
[11] Gra ersID (2023) Advantages and disadvantages of NET framework 2023, Gra ersid Available at: h ps://gra ersid.com/advantages-and-disadvantages-of-using-net/ (Accessed: 04 November 2023)
[12] (No date) Introduc on to diagrams Available at: h ps://www.drawio.com/doc/ge ng-started- diagram-types (Accessed: 04 November 2023)
[13] Morales, J (2022) Draw.io: Comprehensive Review on features, Price, and more, Draw.io: Đánh giá