Object-Oriented Modelling and Design: Coupling, Cohesion, MVC
VerifiedAdded on 2022/09/07
|13
|2294
|32
Report
AI Summary
This report provides a comprehensive analysis of object-oriented modeling and design principles, focusing on coupling, cohesion, and the Model-View-Controller (MVC) design pattern. It begins by defining and explaining coupling and cohesion, detailing various types of each and emphasizing best practices for creating loosely coupled and highly cohesive applications. The report then presents and evaluates class diagrams, including an older design of an admission department system and a redesigned version that incorporates MVC principles. The MVC pattern is explained, highlighting its role in separating concerns in web applications. The report includes class diagrams to illustrate the application of MVC. The report concludes by emphasizing the importance of these principles in creating flexible, maintainable, and scalable software systems. The report draws on various sources to support the concepts discussed.

Running head: OBJECT-ORIENTED MODELLING AND DESIGN
OBJECT-ORIENTED MODELLING AND DESIGN
Name of the Student
Name of the University
Author Note
OBJECT-ORIENTED MODELLING AND DESIGN
Name of the Student
Name of the University
Author Note
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

1OBJECT-ORIENTED MODELLING AND DESIGN
OOP Coupling & Cohesion Principles
1- Coupling
Coupling is an essential principle in object-oriented programming that means the
interdependence degree among the modules of the system. It is seen that the connection level
between the modules of the system shows the interdependence level on each other (Alford et
al 2015). The interdependence can be high and coupling can be low. If the interdependence is
high then the modules requires each other in order to function properly. If the coupling is low
then the system can function without some of the features and without depending on other
modules. Various types of coupling are present and that should be considered in order to
examine coupling in the object-oriented software. The different types of coupling include
common coupling, control coupling, content coupling and data coupling (Bidve and Sarasu
2016). The content coupling is a coupling in which one module can alter the contents that are
present in other modules. The common coupling is a coupling in which all the modules are
dependent upon some modules that are shared. The JDBC module of database connection that
is approachable to all the modules in order to provide connectivity of database. Control
coupling is a coupling in which one module has power of implementation of the other
modules. The data coupling is a coupling in which two of the module can pass in between the
data. In stamp coupling, a structure of data that is the variables is utilized to pass the required
data among the other modules (Chishti and Singhal 2016).
OOP Coupling & Cohesion Principles
1- Coupling
Coupling is an essential principle in object-oriented programming that means the
interdependence degree among the modules of the system. It is seen that the connection level
between the modules of the system shows the interdependence level on each other (Alford et
al 2015). The interdependence can be high and coupling can be low. If the interdependence is
high then the modules requires each other in order to function properly. If the coupling is low
then the system can function without some of the features and without depending on other
modules. Various types of coupling are present and that should be considered in order to
examine coupling in the object-oriented software. The different types of coupling include
common coupling, control coupling, content coupling and data coupling (Bidve and Sarasu
2016). The content coupling is a coupling in which one module can alter the contents that are
present in other modules. The common coupling is a coupling in which all the modules are
dependent upon some modules that are shared. The JDBC module of database connection that
is approachable to all the modules in order to provide connectivity of database. Control
coupling is a coupling in which one module has power of implementation of the other
modules. The data coupling is a coupling in which two of the module can pass in between the
data. In stamp coupling, a structure of data that is the variables is utilized to pass the required
data among the other modules (Chishti and Singhal 2016).

2OBJECT-ORIENTED MODELLING AND DESIGN
Figure 1: Coupling
(Source: Author)
There are various types of coupling:
Message coupling
Stamp coupling
Pathological coupling
Control coupling
Common coupling
External coupling
Data coupling
Content coupling
2- Cohesion
Cohesion is an object-oriented principle that deals with the allocation of responsibility
that is single to a class (Maylawati, Darmalaksana and Ramdhani 2018). This is to make that
class implement the features that it was considered for instead of making the class overload
with responsibilities that are not relevant. For example, if a class that is connected by
Figure 1: Coupling
(Source: Author)
There are various types of coupling:
Message coupling
Stamp coupling
Pathological coupling
Control coupling
Common coupling
External coupling
Data coupling
Content coupling
2- Cohesion
Cohesion is an object-oriented principle that deals with the allocation of responsibility
that is single to a class (Maylawati, Darmalaksana and Ramdhani 2018). This is to make that
class implement the features that it was considered for instead of making the class overload
with responsibilities that are not relevant. For example, if a class that is connected by
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

3OBJECT-ORIENTED MODELLING AND DESIGN
database is developed it should only implement that responsibility precisely as compared to
other fragments of the application code such as the creation of user accounts, features of
email and many more in the similar class. By the separation of the class that is based on the
features, it makes it easy to fix any of the errors that can be caused because of the code that is
unrelated in that class and gives a way in order to play and plug the class with several updates
and to change with the codes that are different (Padhy, Panigrahi and Baboo 2015). The
coupling in object-oriented programming and cohesion works together to make an application
that is easy to create and scale. In order to understand the interdependency between the
various modules, a good programmer is required, as it needs practice and knowledge in all
these concepts (Wu et al 2015).
Figure 2: Coupling
(Source: Kaur and Kaur 2015)
There are various types of cohesion. The types include:
Logical Cohesion
database is developed it should only implement that responsibility precisely as compared to
other fragments of the application code such as the creation of user accounts, features of
email and many more in the similar class. By the separation of the class that is based on the
features, it makes it easy to fix any of the errors that can be caused because of the code that is
unrelated in that class and gives a way in order to play and plug the class with several updates
and to change with the codes that are different (Padhy, Panigrahi and Baboo 2015). The
coupling in object-oriented programming and cohesion works together to make an application
that is easy to create and scale. In order to understand the interdependency between the
various modules, a good programmer is required, as it needs practice and knowledge in all
these concepts (Wu et al 2015).
Figure 2: Coupling
(Source: Kaur and Kaur 2015)
There are various types of cohesion. The types include:
Logical Cohesion
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

4OBJECT-ORIENTED MODELLING AND DESIGN
Co-incidental cohesion
Procedural cohesion
Temporal cohesion
Communication cohesion
Functional cohesion
Sequential cohesion
Cohesion and Coupling: Best Practices
The coupling can be loose or tight and cohesion can be low and high. The best
practice of creating applications with by following the principles of object-oriented
programming is to write the code of programming where the couples are couples loosely and
highly cohesive (Jeong and Kim 2016). Mainly because of doing so assists in the flexibility
of several modules and also maximizes the uncoupling of concerns in the entire program.
This minimizes the chances of the functionality of the program in order to break and makes it
simple in order to refactor the code, to discover the bugs that are present in the code, and to
scale the program when it is required. In all these classes, writing the smaller number of
instance variables is preferable as it assists with the cohesion that is higher (Kaur and Kaur
2015). The objective for the introduction of cohesion and coupling in to make the whole
program into a logical unit that is fully functioning. This procedure of modelling and
designing the programs of software also assists in fixing the issues that are related to
programming and the other application that does not follow the principles of object-oriented
concept tends to shatter the application when adjustments are to be made on the application.
This is because all the modules that are present are dependent on each other and if one of the
modules malfunctions then the program does not operate properly as intended (Khabbazi et al
2018).
Co-incidental cohesion
Procedural cohesion
Temporal cohesion
Communication cohesion
Functional cohesion
Sequential cohesion
Cohesion and Coupling: Best Practices
The coupling can be loose or tight and cohesion can be low and high. The best
practice of creating applications with by following the principles of object-oriented
programming is to write the code of programming where the couples are couples loosely and
highly cohesive (Jeong and Kim 2016). Mainly because of doing so assists in the flexibility
of several modules and also maximizes the uncoupling of concerns in the entire program.
This minimizes the chances of the functionality of the program in order to break and makes it
simple in order to refactor the code, to discover the bugs that are present in the code, and to
scale the program when it is required. In all these classes, writing the smaller number of
instance variables is preferable as it assists with the cohesion that is higher (Kaur and Kaur
2015). The objective for the introduction of cohesion and coupling in to make the whole
program into a logical unit that is fully functioning. This procedure of modelling and
designing the programs of software also assists in fixing the issues that are related to
programming and the other application that does not follow the principles of object-oriented
concept tends to shatter the application when adjustments are to be made on the application.
This is because all the modules that are present are dependent on each other and if one of the
modules malfunctions then the program does not operate properly as intended (Khabbazi et al
2018).

5OBJECT-ORIENTED MODELLING AND DESIGN
Evaluation of Class Diagrams
1- Old Class Diagram
Figure 3: Old Class Diagram
(Source: Author)
The class diagram that is illustrated above is an admission department system of
Northumbria University. In this, diagram 1 was tasked in order to design classes for
Admission Manager, Student and front-end classes for the admission portal, student portal
and a class for online application that dealt with taking required information of the student
with the documents that are required for admission and then forwarding them to the
Admission Manager for the Admission Manager to accept or reject. Looking at the class
diagram it can be seen that it is designed poorly and there is less cohesion among the classes
and the classes are coupled tightly. This class design can still function properly but if any
changes occur in the system, the system will break. There is a degree of duplication of code
Evaluation of Class Diagrams
1- Old Class Diagram
Figure 3: Old Class Diagram
(Source: Author)
The class diagram that is illustrated above is an admission department system of
Northumbria University. In this, diagram 1 was tasked in order to design classes for
Admission Manager, Student and front-end classes for the admission portal, student portal
and a class for online application that dealt with taking required information of the student
with the documents that are required for admission and then forwarding them to the
Admission Manager for the Admission Manager to accept or reject. Looking at the class
diagram it can be seen that it is designed poorly and there is less cohesion among the classes
and the classes are coupled tightly. This class design can still function properly but if any
changes occur in the system, the system will break. There is a degree of duplication of code
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

6OBJECT-ORIENTED MODELLING AND DESIGN
that is high as the admission manager and the student are two different persons with different
roles in the system, these two should extend from the person class, and any additional feature
should be given in the classes of student and the admission manager and it will maximize the
cohesion and the coupling of the present system will be tightened.
2-Updated Class Diagram
Figure 4: New Class diagram
(Source: Author)
MVC: Model View Controller Design Pattern
The model view design pattern is an architectural pattern of design that is used
extensively in creating the applications of web (Cortez and Vazhenin, 2015). This pattern of
design follows the principles of object-oriented design and separates the code of the
application in the layers that are visible. This is helpful in order to separate the layer of
that is high as the admission manager and the student are two different persons with different
roles in the system, these two should extend from the person class, and any additional feature
should be given in the classes of student and the admission manager and it will maximize the
cohesion and the coupling of the present system will be tightened.
2-Updated Class Diagram
Figure 4: New Class diagram
(Source: Author)
MVC: Model View Controller Design Pattern
The model view design pattern is an architectural pattern of design that is used
extensively in creating the applications of web (Cortez and Vazhenin, 2015). This pattern of
design follows the principles of object-oriented design and separates the code of the
application in the layers that are visible. This is helpful in order to separate the layer of
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

7OBJECT-ORIENTED MODELLING AND DESIGN
database from view and the layers of controller. The model illustrates the layer of data as in
the application that are large scale and it is easy to recognise the layers that deal with the type
of logic. The layer of controller deals with the classes that are related to controller and are
utilised to define the behaviour of the application. These classes of controllers react as cops
of traffic and in architecture of web application where there is a configuration of server and
client (Thakur and Pandey 2019). It takes the input of the user from a browser and it is taken
in the form of request and then the request is channelled towards the layer classes of model
that is rightful and then a response is prepared in order to put it forward to the layer of view
so that the end user can view the type of data that is sent back on the browser. Developing
some applications with the help of model view controller design pattern assists the
programmers to develop the applications quickly and it is easier to maintain such applications
in the incidents of bugs.
Figure 5: MVC
(Source: Cortez and Vazhenin 2015)
database from view and the layers of controller. The model illustrates the layer of data as in
the application that are large scale and it is easy to recognise the layers that deal with the type
of logic. The layer of controller deals with the classes that are related to controller and are
utilised to define the behaviour of the application. These classes of controllers react as cops
of traffic and in architecture of web application where there is a configuration of server and
client (Thakur and Pandey 2019). It takes the input of the user from a browser and it is taken
in the form of request and then the request is channelled towards the layer classes of model
that is rightful and then a response is prepared in order to put it forward to the layer of view
so that the end user can view the type of data that is sent back on the browser. Developing
some applications with the help of model view controller design pattern assists the
programmers to develop the applications quickly and it is easier to maintain such applications
in the incidents of bugs.
Figure 5: MVC
(Source: Cortez and Vazhenin 2015)

8OBJECT-ORIENTED MODELLING AND DESIGN
Redesigning: Class Diagram and MVC
Assignment 1: Class Diagram
Figure 6: Class Diagram
(Source: Author)
Redesigning: Class Diagram and MVC
Assignment 1: Class Diagram
Figure 6: Class Diagram
(Source: Author)
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

9OBJECT-ORIENTED MODELLING AND DESIGN
Assignment 2: Class Diagram
Figure 7: Redesigned Class Diagram
(Source: Author)
This is the new diagram and it is the redesign of the class diagram that is older. In this
model view of diagram, the design pattern of the controller was executed but there can be
more details that should be there but for this assignment, this diagram illustrates the required
separation of concern and segregating the features in three layers that are visible. It can be
seen, the students that are potential will see the classes that are view, thus ending with a word
that is view at the end of the name of the class that represents the web pages and that. The
admission manager and the student that are the object of model in this design of system are
interconnected to the class of controller as this is the class that is responsible in order to
facilitate the response and request the model and the view classes. By doing this, the
application can operate still if some of the classes that are present are removed and it is
Assignment 2: Class Diagram
Figure 7: Redesigned Class Diagram
(Source: Author)
This is the new diagram and it is the redesign of the class diagram that is older. In this
model view of diagram, the design pattern of the controller was executed but there can be
more details that should be there but for this assignment, this diagram illustrates the required
separation of concern and segregating the features in three layers that are visible. It can be
seen, the students that are potential will see the classes that are view, thus ending with a word
that is view at the end of the name of the class that represents the web pages and that. The
admission manager and the student that are the object of model in this design of system are
interconnected to the class of controller as this is the class that is responsible in order to
facilitate the response and request the model and the view classes. By doing this, the
application can operate still if some of the classes that are present are removed and it is
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

10OBJECT-ORIENTED MODELLING AND DESIGN
flexible highly in terms of adding the functional classes that are additional. This design has
loose coupling and high cohesion.
This model view controller design is utilized commercially for the application of web
and the application that are based on desktop and it assists in maximizing the speed in order
to develop and deploy. There is also some disadvantages of using this pattern of design for
the developers of software that are new as it needs large array of skills and technologies and
it should be learnt so that the entire architecture of the design and application can be easily
understood. If this experience and skills is not present then it can be very hard for some
people as this pattern of design is constructed in order to follow some rules and the rule is
that it should not be integrated with the other systems and the various patterns of designs.
flexible highly in terms of adding the functional classes that are additional. This design has
loose coupling and high cohesion.
This model view controller design is utilized commercially for the application of web
and the application that are based on desktop and it assists in maximizing the speed in order
to develop and deploy. There is also some disadvantages of using this pattern of design for
the developers of software that are new as it needs large array of skills and technologies and
it should be learnt so that the entire architecture of the design and application can be easily
understood. If this experience and skills is not present then it can be very hard for some
people as this pattern of design is constructed in order to follow some rules and the rule is
that it should not be integrated with the other systems and the various patterns of designs.

11OBJECT-ORIENTED MODELLING AND DESIGN
Bibliography
Alford, R.F., Leman, J.K., Weitzner, B.D., Duran, A.M., Tilley, D.C., Elazar, A. and Gray,
J.J., 2015. An integrated framework advancing membrane protein modeling and design. PLoS
computational biology, 11(9), p.e1004398.
Bidve, V.S. and Sarasu, P., 2016. Tool for measuring coupling in object-oriented java
software. International Journal of Engineering and Technology, 8(2), pp.812-820.
Chishti, F. and Singhal, A., 2016. Proposed model on coupling measures in aspect oriented
software development using fuzzy logic. In 2016 2nd International Conference on Advances
in Computing, Communication, & Automation (ICACCA)(Fall) (pp. 1-6). IEEE.
Cortez, R. and Vazhenin, A., 2015. Virtual model‐view‐controller design pattern: Extended
MVC for service‐oriented architecture. IEEJ Transactions on Electrical and Electronic
Engineering, 10(4), pp.411-422.
Jeong, W. and Kim, K., 2016. A performance evaluation of the BIM-based object-oriented
physical modeling technique for building thermal simulations: a comparative case
study. Sustainability, 8(7), p.648.
Kaur, M. and Kaur, R., 2015. Improving the design of Cohesion and coupling metrics for
aspect oriented software development. Int. J. Comput. Sci. Mob. Comput, 4(5), pp.99-106.
Khabbazi, M.R., Wikander, J., Onori, M. and Maffei, A., 2018. Object-oriented design of
product assembly feature data requirements in advanced assembly planning. Assembly
Automation, 38(1), pp.97-112.
Maylawati, D.S., Darmalaksana, W. and Ramdhani, M.A., 2018, January. Systematic design
of expert system using unified modelling language. In IOP Conference Series: Materials
Science and Engineering (Vol. 288, No. 1, p. 012047). IOP Publishing.
Bibliography
Alford, R.F., Leman, J.K., Weitzner, B.D., Duran, A.M., Tilley, D.C., Elazar, A. and Gray,
J.J., 2015. An integrated framework advancing membrane protein modeling and design. PLoS
computational biology, 11(9), p.e1004398.
Bidve, V.S. and Sarasu, P., 2016. Tool for measuring coupling in object-oriented java
software. International Journal of Engineering and Technology, 8(2), pp.812-820.
Chishti, F. and Singhal, A., 2016. Proposed model on coupling measures in aspect oriented
software development using fuzzy logic. In 2016 2nd International Conference on Advances
in Computing, Communication, & Automation (ICACCA)(Fall) (pp. 1-6). IEEE.
Cortez, R. and Vazhenin, A., 2015. Virtual model‐view‐controller design pattern: Extended
MVC for service‐oriented architecture. IEEJ Transactions on Electrical and Electronic
Engineering, 10(4), pp.411-422.
Jeong, W. and Kim, K., 2016. A performance evaluation of the BIM-based object-oriented
physical modeling technique for building thermal simulations: a comparative case
study. Sustainability, 8(7), p.648.
Kaur, M. and Kaur, R., 2015. Improving the design of Cohesion and coupling metrics for
aspect oriented software development. Int. J. Comput. Sci. Mob. Comput, 4(5), pp.99-106.
Khabbazi, M.R., Wikander, J., Onori, M. and Maffei, A., 2018. Object-oriented design of
product assembly feature data requirements in advanced assembly planning. Assembly
Automation, 38(1), pp.97-112.
Maylawati, D.S., Darmalaksana, W. and Ramdhani, M.A., 2018, January. Systematic design
of expert system using unified modelling language. In IOP Conference Series: Materials
Science and Engineering (Vol. 288, No. 1, p. 012047). IOP Publishing.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 13
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.