0% found this document useful (0 votes)
52 views5 pages

Critical Report On Object Oriented Programming Concepts:: Abstraction

This document provides a critical report on the object oriented programming concepts used in a medicare system developed previously. It discusses the key concepts of abstraction and composition that were used, and provides screenshots to illustrate them. It also suggests that aggregation could improve the design by making the relationship between patient and appointment less dependent. The implementation matches the proposed design, but aggregation would further enhance the system by avoiding destroying patient objects if appointments are deleted.

Uploaded by

WaQar Saleem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views5 pages

Critical Report On Object Oriented Programming Concepts:: Abstraction

This document provides a critical report on the object oriented programming concepts used in a medicare system developed previously. It discusses the key concepts of abstraction and composition that were used, and provides screenshots to illustrate them. It also suggests that aggregation could improve the design by making the relationship between patient and appointment less dependent. The implementation matches the proposed design, but aggregation would further enhance the system by avoiding destroying patient objects if appointments are deleted.

Uploaded by

WaQar Saleem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Critical report on Object Oriented Programming Concepts:

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.

Aggregations type of relation is “has a”. So while comparing aggregation and


composition, we can say that in composition there is as strong dependency between
two classes and they cannot exist without each other. Like human brain and human
being. Human brain is composed in human body and if human dies, its brain also
destroys.While in aggregation,the dependency between two classes is less and so
they have “has a” relation.In this relation both of these two classes can exist without
each other.Lets take an example of teacher and department.They both have a ‘has a
“ relation between them.They are loosely coupled and if department gets
destroyed,teacher will not be destroyed.

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.

In terms of developing the application in different way,I would make a design


improvement that I already discussed above.Patient shall be aggregated in
appointment class and it shall not be composed.Patient is a separate identity and It
can exist on its own.By using this approach numerous benefits are there and design
of whole the system gets improved.There is less dependency between the two
classes.Patient wont get destroyed in case of destroying of appointment.
In regards to technical implementation.we will store pointer of patient class in
appointment class.

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:

Aayushi Johari,2019 Object Oriented Programming – Java OOPs Concepts With


Examples Available at:

https://www.edureka.co/blog/object-oriented-programming/
[Accessed 27 August 2019].

CHAITANYA SINGH,2014 OOPs concepts – What is Aggregation in java? Available at:

https://beginnersbook.com/2013/05/aggregation/

[Accessed 27 August 2019].

You might also like