Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

Design Patterns Impact on Software Quality and Design

Abstract
This assignment report is aimed at justification and implementation of the use design patterns
which enhance testability leading to better software development. The design pattern approaches,
and structures have been demonstrated through multivariate experiments that along with the
variety of categories and analyze the pattern of the and their interactions. The results obtained to
simplify the understanding of the overall directory structure, and, thus, to facilitate the
classification of other the design and implementation of these design patterns to the development
of software applications. These simplifications of design patterns inherit the plan, described,
identified the objects, their interactions, and the distribution of their work. Design patterns play
many roles in the process of object-oriented development: they provide a common vocabulary
for design, they reduce the complexity of the system, and some of the abstractions, they
constitute the basis of the experience of the software, and they act as building blocks that can be
built for more complex projects. The Design re-usable microarchitectures that contribute to the
overall architecture of the system. We also describe how to express and organize design patterns
in any system along with the simpler solution and the present is a catalog of design patterns. We
will also describe our experience in the use of design patterns in the design of object-oriented
systems.

Introduction
Testability of a software is the focus in this document. This document elaborates the degree to
which a software artifact can support testing of different modules. Testability has to be high such
that it is easily carried out. Library management system is the focus in this documentation. The
library management system is made up of a variety of functions, such as dealing with a certain
amount of the book, and the creation of one of the users. Also, a search function, in order to
allow the user to find the desired library asset. And therefore, the system design of the pattern is
important, because not only does it help to deal with the code, but also to help you manage the
code in the buffer. A variety of patterns that can be used in a variety of scenarios not all models
of the design is appropriate for the library management system. Library management system. It is
the same as that of the general class of graphs, which are shown in the image.1, are quite
complex and hard, because some of the methods used can be changed through the
implementation of a design pattern.
This report, therefore, concentrates at demonstrating that testability contributes significantly
towards the development of a software and its suitability for the end users. Methodology that is
used in software development has also been explained in detail to enable the users develop the
picture of how testability is important. A scenario has been created which a simple solution is
explained in detail for better understanding. In this way, the developers can appreciate the reason
behind certain outputs and how the outputs have been affected by the way the code has been
written.
Literature Review

1. To reduce the impact of the design and the quality of the software
The researchers examined the effect of UP on several quality requirements, such as maintenance,
disposition changes, the performance, and the propensity for error. Prechelt et al. [1] carried out
an experiment to investigate the service, the maintenance of the software, using the patterns, and
to compare the adoption of those of the other scenarios, but with simpler options. They found
that, in many cases, the solution is that the use of the GoF patterns is easier to maintain than the
equivalent of a simple solution. Despite this, the authors also found that, in the current situation,
and with the help of a template, it is difficult to sustain the program. They are also confirmed to
be a relatively easy solution to construct a pattern that may require additional maintenance.
Vokac et al. [26] to reiterate the study of the Prechelt et al. [1], and find a model for the visitor,
resulting in a high time-cost in terms of development and low degree of accuracy. They are the
interior designer that will make it easier to take care of, even if it is difficult to trace the control
flow of a program and, therefore, increases the amount of work that is required in order to fully
understand it. So, even if the maintenance is not good, the decrease in comprehension. A number
of studies have been carried out [27-29], and several studies have been carried out in [1]. Some
of the studies [27-29], it has been shown that the DP will have a negative impact on the
maintenance, while others (e.g., [30]) have not yet found exactly the trending in the force, and
recommended a more in-depth and practical analysis. In addition, the Garzas, et al. [31] found
that the pattern of the design, and it makes it hard to understand, and modifiability. On the other
hand, Hegedus et al. [32] evaluated the effect of some of the JHotDraw the DP system
maintenance and saw that the Dps can make a positive impact of the maintenance, and the reason
is to improve the code.

2. Investigate the maintenance of design patterns.


Lutz Prechelt et al. [33], which is a controlled experiment in order to investigate if the developers
are able to work better and faster UP the program code is, of course, be documented with the aid
of a commentary on the fact that there is simply not well documented in the program. They said
that the maintenance of the matter is, based on the template, is performed more quickly than, or
less than, the number of questions in relation to the other. Aversano et al. [34] carried out a study
in order to evaluate the interaction between the DP and the willingness to change. The results
show that the DP is more efficient, more effective, provided that the DP is a tool to play a major
role in the system's operation. On the other hand, Gatrell et al. [35] found that, for certain classes
of Up, participants were more likely to change than those with fewer participants. Bieman et al.
[36] investigated the interplay between the evolution of the structure of the change of the design.
Five of the systems with the open-source software have been used in order to carry out the tests.
The structure of the recognition of the constructs used in the model, for the design, the size of the
class, as well as the participation in the class is inherited. The results of this study show that the
classes are related to the design, the pattern is more responsive to changes in many different
varieties.
This group of patterns, thus facilitating the software design, offer an easy way to make the
relationships between the objects. Examples of this would be if all of the class and object
composition. The structural templates to create new classes, using inheritance to create a user
interface and structure of the test object, to define the different ways to create objects in order to
get a new functionality to the system. Examples of the method of construction are the adapter,
decorator, bridge, composite, weight, façade, and proxy settings. This is a design of the model,
especially related to the creation of instances of a class that is composed of two dominant ideas.
It summarizes the knowledge on the specific classes of users of the system, and the other to
conceal how those specific classes to be created, and used in the cases in which these specific
classes are used [1]. The model, a creative design that is further divided into the models, and the
object of the creative class-the creative, in which the subject and the creative, get down to the
business object models and the class of the creative shop to create a class. For more detailed
objects of the creativity of the pattern of the shooting up of a part of creating an object out of
another object, and the cool creativity pattern of firing up to its object-create a subclass of the
Gang of Four [17].The relationship between the patterns illustrated, however, are not
confidential, even if the classification of a pattern is included. They are within the jurisdiction of
the (classes, objects, structures), and the characteristics of the product (creative, structure, and
behavior) is orthogonal to the one obtained in this paper.
III. Methodology
We have selected the system based on the analysis of the P-March, the list of participants [60]. In
addition, we've chosen a template, plan, design, and code analysis tools. The InFusion of the tool
[61], was selected for the detection of code smell, and in the Custody of the P-March, it has been
used in order to get information about the design patterns. We have kept the default settings
identified with a code smell to the potential duplication of efforts of those of us who are gathered
in the code, the smell of the information about the patterns of each of the systems. Template for
your Design, we will use the existing XML file in the P-March, the repository of the system, and
analyse them in order to get to each of the template classes, as well as the corresponding
templates. This step resulted in the formation of the 10 files of each of the systems. For each
system, we have matched the design template, the files and the code in the scents, and compare
them later. That's why we created a project file, in order to maintain the output results, the
pattern, and the corresponding code of the variety of flavors. This means that the information
required to patterns and code smells to be made available for each class, for each file system.
Each one has 25 columns, the first column is the name of the class for which you want to display
the corresponding template of that class, if any.

IV. Case Scenario


University library management system is a system which is used by university in the
management of all library resources and especially books. In this way, students who have
borrowed books are able to be captured and their details recorded easily. Some systems however,
lack very essential modules such as searching the books by the name of the author. The current
system needs a student to be able to know the author, the date it was published and the order of
the names. The University of Malaysia seeks to incorporate modules which enable the students
to search books by any key word in regard to the book. This will also enable the librarian to have
accurate records in regard to the books that have been borrowed.

B. Simple Solution - Java Implementations


Some of the specific implementation in the library management system has been updated
according to the requirements.First of all, a class called a "Database" is created using the getId()
and a custom design. In the first one the call of the object, the object will be created and stored in
the w. So, if the item is popular,a new object will be created, and the id of the return of items that
have been created during the first call. Java singleton is one of the best designs in order to
implement the code. This one is also a creative pattern because it is also about creating an object.

C. Design Issues encountered in the simple solution.


A template such as this is used when you have a single instance in which what you need is easy
to access, fast, fast. The Singleton pattern is to create a new object, but only one
the objects are created, and provides one of the ways to get out of the object, without having to
create an instance of the object class. [2] The script is written in 3 copies. the string stuID, lecID,
and StaffID for the user class it may also be possible to check that the system Id of the database,
none of the information pairs are generated in the database.
Complexity Issues

Coupling has been observed among the classes such that they depend on each other to be able to
perform their given functionality. For instance to search for a book in the library, one has to
know the author as well as the catalog hence the need to call the Catalogue class to utilize its
searchByAuthor method.
There is also too much dependencies among the classes to be able to perform the functionalities
in an effective manner hence some classes may know too much in regard to other classes which
depend on them.

In this example, ReNum class has the ability to directly manipulate variables in other classes by
object instantiation of the RegNum class. High coupling has impact on modularity and is not
good for overall software Testability as if the number of modules and more features gets added
into the library system and adopts this kind of practice, there will be problems that the
developers will face in trying to find which method invokes which class and so on.

High coupling has impact on modularity and is not good for overall software Testability as if the
number of modules and more features gets added into the bank and adopts this kind of practice,
there will be problems that the developers will face in trying to find which method invokes
which class and so on.Cohesion, Coupling, Modularity Concerns, Accessibility Concerns,
Multiple Instance, Complexity Concerns.

a) Possibility of Multiple Instantiations


As the software is to be implemented into a piece of hardware that is mobile phones and
computers running different operating systems itself, there might be a possibility of more than
one StudentDashboard object being instantiated by the user intentionally or unintentionally
through the use of excessive input or responses. This creates further confusion and concerns in
software Testability as this will render the overall software less testable as it is prone to errors
which may occur now and again.

b) Accessibility Concerns
Furthermore, other weaknesses in the simple solution are detected in the improper use of access
modifiers. In the below code example, it is seen that a part of the code does not hide its variables
from other classes. This could lead to poor obscurity practices and can let instantiations of other
classes gain too much data/visibility on the class itself.

To illustrate, the RegNum.java class has all registration numbers for specific students variables
set as public. Although this does not really affect the current solution as the module being shown.
Further refinements made to the overall software would prove difficult as incorrect access
modifiers leading to poor modularity will allow accidental changes to a part of a Class being
made, or high potential towards poor data security practices that could eventually lead to
breaches that will incur any extra cost to the university management.

VI. Refined Solution


A. Design Issues Solution
a) Singleton
This is the use of one context class, one root abstract state class and concrete state classes that is
implicit delegation link from concrete state classes to context for instance.

UML Refined Solution


b) Façade
The modules or libraries that are continuously growing, the Library Management System has the
ability to adopt to different changes. A simple interface has been used to implement the solution
through hiding complexity through the use of abstraction technique. A single Façade class has
been used to interlink different methods such that it forms the main point of interaction. In this
way, tight coupling has been solved hence dependencies within the classes is reduced. Therefore,
the complexity and coupling problems that are being experienced in the current system have
been solved by the use of a simple façade solution. The program will be able to remain testable
even in the future when new subclasses are added to improve on various functionality. Single
responsibility Principle can easily be implemented by the use of Façade pattern hence sole
responsibility can be held by each module of a program.
Empirical Evaluation
In the final step, we carried out a statistical analysis of the data and a data mining, with the help
of the data that is stored in the files in order to analyze the results. Sections 3.3 and 3.4 discuss
the further information on the collection of data and the statistical tests used in this study. We are
able to study the experiences, influences, habits, and the quality of the connection with the
maintenance and software evolution. We show that, in general terms, the patterns in practice will
have a negative impact on the quality in order to provide concrete evidence of general
knowledge. We then examine whether these experiences, design patterns, and object-oriented
best practices, and to formulate a second hypothesis regarding the effects of these policies. We
show the results of some of the models, the designs of which can't be explained, and the
conclusion is that new research is needed. As such, we see further evidence, the pattern must be
used with caution in the course of development, because they are in fact hindering the service
and its development. The factory mall, which is the most-used template, simply, to give
examples of cases in which it should be used. Create the templates as an abstract object is
created, and hide features to create the process. They are useful because it is often the
undesirable, clearly marked, class name of the when you create a new instance of the object. This
reduces the flexibility, as it allows the programmer to commit to a specific class, rather than
define a new protocol. If, in order to prevent hard-coding the class after that, it will be possible to
postpone the class, the selection at run-time. In particular, the templates will generate the classes
for a while, some of the elements of the subject, in order to create a subclass. Example of A
factory method is an abstract method, which is called a base class, but it is defined in the
application. A subclass of methods to create instances of the type will depend on them, the sub-
class, which is carried out for each method.The concept is a copy of an existing object rather
than creating a new instance from scratch, it can be a very costly operation. This object serves as
a prototype to represent the state of the object. The copied item can be changing, the same
features, only to the extent necessary. This approach saves you the expense and time, for
example, to create a new object, and heavy processing. The prototype template is a creative
design template. A sample-based prototype can be useful if you are creating an object, it takes a
long time, and it is a very costly operation, so we can create an object from the existing object.
One of the easiest ways to create an object of an existing object, the clone () method. The clone
is the easiest way to implement a prototype of the template. However, this is an issue for you and
how you can solve it with a copy of an existing object, which is based on your business model.

A. Quality Factor Measurement


Apply the measuring technique/tool and calculate value of your Quality Factor for both Simple
Solution and Refined Solution. The measurements and evaluation processes should be clearly
shown with complete steps.
The measuring tool used in this document is known as SonarQube, which its steps to install,
setup and run the program and implementing its use towards the simple and refined solutions
will be shown in the Appendix section of E and F in this document. Tutorials on how to run the
simple

B. Analysis
Based on the previously mentioned formula in the beginning sections, a lower score for the value
T indicates better Testability of the Software in general.
The results of both solutions are shown as of below:

a) Simple Solution:

b) Modularity:
The Modularity for the Simple Solution is shown to be 76.
While through SonarQube’s analysis, the Cyclomatic Complexity of the code is shown to be 30.
There are no duplicated lines/dead code present in the simple solution provided.
From the general formula for Testability Provided. Testability for the Simple Solution is 50.

c) Refined Solution

For the refined solution, as the Façade class acts as an interface that controls all methods that are
there in other classes which remain untouched, only the Façade and Main class will be counted
along inside of the formula.

Modularity:

The Modularity for the Refined Solution is shown to be 42.

While as Cyclomatic Complexity for the BankInterface package that houses the main class and
Façade+Singleton pattern shows to be 16.

Furthermore, no duplications nor dead code are found in the Refined Solution.
Based on the above formula, the Testability for the Refined Solution is shown to be 27.4

It is shown that this value of 27.4 for the Refined solution carrier a lower weightage than the T
value of the Simple Solution, which is shown to be 50. This proves that by applying Design
Patterns Façade and Singleton, Testability is further improved in the Refined Solution.

Conclusion
The design pattern of the production of the revolution, what we believe to be to design an object-
oriented
the problems in the system. As we have seen, those that are applied in the different phases of the
design and the original design, re-use,and the refactoring process. They gave us a new level of
abstraction for the design of the system. A new level of abstraction, often opening up new
opportunities for increased levels of automation. We are going to explore the interactive tools
that are able to take advantage of the design. One of these tools, the user, is to explore the outer
space of the objects, run the software, and the study of their inter-relationships. By means of
observations the user may find that the existing one or brand-new samples, the tool makes it
possible to record and catalog observations. In this way, the user can better understand the
application software, the on -on their own, on the basis of this, the design of the general public.

References
[1]Ali, M. and Elish, M.O., 2013, June. A comparative literature survey of design patterns
impact on software quality. In 2013 international conference on information science and
applications (ICISA) (pp. 1-7). IEEE.
[2]Ampatzoglou, A., Frantzeskou, G. and Stamelos, I., 2012. A methodology to assess the
impact of design patterns on software quality. Information and Software Technology, 54(4),
pp.331-346.
[3]Alghamdi, F.M. and Qureshi, M.R.J., 2014. Impact of design patterns on software
maintainability. International Journal of Intelligent Systems and Applications, 6(10), p.41.
[4]Ampatzoglou, A., Charalampidou, S. and Stamelos, I., 2013. Research state of the art on GoF
design patterns: A mapping study. Journal of Systems and Software, 86(7), pp.1945-1964.
[5]https://www.journaldev.com/1827/java-design-patterns-example-tutorial
[6]https://www.researchgate.net/publication/221560732_An_empirical_study_on_the_evolution
_of_design_patterns
[7]Jaafar, F., Guéhéneuc, Y.G., Hamel, S., Khomh, F., Zulkernine, M.: ‘Evaluating the impact of
design pattern and anti-pattern dependencies on changes and faults’, Empirical Software
Engineering, 2015, 21, (3), pp. 896–931
[8]Edwin, N.M., 2014. Software frameworks, architectural and design patterns. Journal of
Software Engineering and Applications, 2014.
[9]https://www.cs.auckland.ac.nz/~john-g/papers/tools2002.pdf
[10]https://www.edureka.co/blog/library-management-system-project-in-java
[11]Karsenty, L., 1996, April. An empirical evaluation of design rationale documents. In
Proceedings of the SIGCHI conference on Human factors in computing systems (pp. 150-156).
[12]https://www.semanticscholar.org/paper/Empirical-Evaluation-of-Software-Design-Patterns-
Gupta-Singh/ea64f7c6583077d75c321431a695287798135bae#extracted
[13]Karsenty, L., 1996, April. An empirical evaluation of design rationale documents. In
Proceedings of the SIGCHI conference on Human factors in computing systems (pp. 150-156).

APPENDIX
Use Case Diagram

You might also like