Critical Report On Object Oriented Programming Concepts:: Abstraction
Critical Report On Object Oriented Programming Concepts:: Abstraction
As we have used java programming in this and java itself is object oriented
programming.Speaking of java as object oriented programming,it includes all the
concepts of oop like abstraction,encapsulation,inheritance etc.In java while making
object oriented system,it basically involves making classes and them making the
relationship between them.Like in our system,appointment and patient are two
classes and there is a part of relation between them.Now the advantage of this
approach is that by using oop concepts,code becomes more cleaner,reusable and
less prone to inconsistency.So this is the overview of java as a object oriented
language.
In this report,I will be discussing and will be critically evaluating the design of the
medicare system that was developed earlier.
In terms of object oriented concepts many different concepts are being used in this
whole project.But the most prominent of them is the use of abstraction and
composition.
Firstly lets discuss what are they.
Abstraction:
Abstraction is basically hiding the internal details from the user and just providing
the abstract view to the user and then user can only see the abstract view.
In the code in the patient class,print function is the example of abstraction.User only
calls the print function and all the information of employee is displayed to the
user.User just have to call the print function and he/she doesnot have to worry
about the internal details of the print function.So this is the example of abstraction
concept which is used in our system.
Below is the screenshot depicting the above feature.
Composition:
Next comes the other concept of Object oriented programming (OOP) is
composition.It is the counter of inheritance.Rather than inheriting the class,the
object of some other class is composed in the current class.By this we can achieve
has a relation between two classes.Lets suppose,if we take the example of our
system,patient is composed in appointment class.So we can read it as ,There is part
of relation between Patient and appointment.Patient is part of appointment.So
second OOP concept that is used is composition.
Below is the screenshot depicting the behaviour of this concept.
Now coming to the justification of why I have used these concepts of object oriented
programming, if we map our system to real world system.in which there is the
environment of hospital, whenever there is an appointment, doctor as well as
patient is involved. So that's why I used composition because patient is involved in
the appointment.
In regards to abstraction, I have used this concept to display the information of
patient. Now in appointment, information of employee is to be displayed, so we are
not interested in how that information is displayed, we just call a function and it
prints out the result.
So this was all about the concepts that were used in our system and the justification
of them of why these were used. They were better because it makes the code
cleaner to use, makes it more reusable and makes it straight forward for outside
person to learn it by providing abstraction. So these are few of the benefits of using
this approach
Now moving forward, if we look back at the design and what improvements could be
made in it, the only improvement I see is the use of aggregation instead of
composition. Firstly, I would explain what is aggregation and then I would link it to
the system that is being made.
So let us map this to our system and what improvements can we make.As discussed
earlier,we have used composition between appointment and patient class.Now if
appointment gets destroyed,patient shall remain and should not be destroyed.But in
the present case it will be destroyed because patient object is composed in
appointment class.So by using aggregation between these two classes,if the
appointment gets destroyed some how,then in that case patient will not be
destroyed and this makes our system more realistic and less dependable.So this is
the improvement we can do to make our system better.
Coming to the last part of report in which meeting the design section will be
discussed,all the development was done according to the proposed design in which
each and every class was represented along with attributes and their relations were
also made in the design document.Each and every implementation is done according
to the proposed design and no conflict occurs between the design and
implementation.For example in the design document it was mentioned,that patient
is a part of appointment class and appointment class attributes contains patient
object.Now we can see that in implementation,exactly similar structure is
implemented and implementation is replica of design document.
So this is the whole critical report of our system medicare.It discusses all the
necessary object oriented programming concepts that are used in our system along
with the screen-shots of it.It also contains the suggestions for the improvement of
whole system and what kind of benefits that new design can bring.
References:
https://www.edureka.co/blog/object-oriented-programming/
[Accessed 27 August 2019].
https://beginnersbook.com/2013/05/aggregation/