Professional Documents
Culture Documents
Pubudu Oop
Pubudu Oop
PUBUDU KAVISHKA
ESOFT METRO COLLAGE – NUWARA ELIYA
pubudukavishka@gmail.com
Object Oriented Programming Sarasavi Information System
Table of Contents
1 Task 1................................................................................................................................5
1.1 What is Object Oriented Programming (OOP)..........................................................5
1.2 Purposes of OOP.......................................................................................................5
1.2.1 Code reuse and recycle.....................................................................................5
1.2.2 Design Benefits.................................................................................................5
1.2.3 Software Maintenance Ease..............................................................................5
1.2.4 Reliable.............................................................................................................6
1.2.5 Useful Concepts................................................................................................6
1.3 OOP Principles..........................................................................................................7
1.3.1 Encapsulation....................................................................................................7
1.3.2 Data Abstraction...............................................................................................8
1.3.3 Polymorphism...................................................................................................8
1.3.4 Inheritance........................................................................................................8
1.3.5 Objects..............................................................................................................9
1.3.6 Classes...............................................................................................................9
1.3.7 Destruction.......................................................................................................9
1.3.8 Garbage Collection............................................................................................9
2 Task 2..............................................................................................................................10
2.1 Classes of Sarasavi Information System..................................................................10
2.1.1 Class Library....................................................................................................10
2.1.2 Class Reader....................................................................................................11
2.1.3 Sub-Class Registered Member........................................................................12
2.1.4 Sub-Class Registered Visitor............................................................................13
2.1.5 Class Library Card............................................................................................14
2.1.6 Class Librarian.................................................................................................15
2.1.7 Class Book.......................................................................................................16
3 Task 3..............................................................................................................................17
3.1 Use case Diagram....................................................................................................17
3.2 Entity Relationship Diagram....................................................................................18
4 Task 5..............................................................................................................................19
4.1 Usage of Control Structures....................................................................................19
4.1.1 Startup Menu..................................................................................................19
4.1.2 Administrator Login.........................................................................................20
PUBUDU KAVISHKA 1
Object Oriented Programming Sarasavi Information System
5 Task 6..............................................................................................................................21
5.1 Integrated Development Environment (IDE)...........................................................21
5.1.1 What is an Integrated Development Environment (IDE)?...............................21
5.1.2 The IDE used in the development of the Sarasavi Information System...........22
5.1.3 Visual Studio 2013...........................................................................................22
References..............................................................................................................................26
PUBUDU KAVISHKA 2
Object Oriented Programming Sarasavi Information System
List of Figures
Figure 1: Startup Menu................................................................................................19
Figure 2: Administrator Login.....................................................................................20
Figure 3: Error List.......................................................................................................24
Figure 4: Drag & Drop Tools.......................................................................................24
Figure 5: Effective Code Editor...................................................................................24
PUBUDU KAVISHKA 3
Object Oriented Programming Sarasavi Information System
List of Tables
Table 1: Class Library..................................................................................................10
Table 2: Class Reader...................................................................................................11
Table 3: Sub-Class Registered Member.......................................................................12
Table 4: Sub-Class Registered Visitor.........................................................................13
Table 5: Class Library Card.........................................................................................14
Table 6: Class Librarian...............................................................................................15
Table 7: Class Book.....................................................................................................16
PUBUDU KAVISHKA 4
Object Oriented Programming Sarasavi Information System
1 Task 1
1.1 What is Object Oriented Programming (OOP)
Object oriented programming is a programming technique in which all the
components in the system are treated as objects. These objects can model real-world
objects like cars, people, buildings, etc. virtually. Most of the object oriented
programming languages are event driven programming languages.
PUBUDU KAVISHKA 5
Object Oriented Programming Sarasavi Information System
1.2.4 Reliable
The software created using object oriented programming is more reliable because it
takes intense designing to make a system. This intense designing creates a more stable
and reliable software.
PUBUDU KAVISHKA 6
Object Oriented Programming Sarasavi Information System
Encapsulation
Data Abstraction
Polymorphism
Inheritance
Objects
Classes
Destruction
Garbage Collection
1.3.1 Encapsulation
Encapsulation is hiding data from assessors and mutators by using some restrictions.
Encapsulation is access by modifiers.
1.3.1.1 Modifiers
Modifiers are keywords that modify the definition of a class. Given below are the
main types of modifiers.
Private
o This is the default modifier
o This type of class can only be accessed by members of the certain
class.
o It cannot be accessed by other classes or members other than the
members of the certain class.
Public
o This class can be accessed by any part of the program, it is public.
Protected
o Access is limited to within the class definition and any class that
inherits from the class
Internal
o Access is limited exclusively to classes defined within the current
project.
PUBUDU KAVISHKA 7
Object Oriented Programming Sarasavi Information System
Protected Internal
o All members in current project and all members in derived class can
access the variables.
With the use of encapsulation we can make sure that when changing the object’s code
it would not affect other code in the program.
1.3.3 Polymorphism
Polymorphism simply means one object having different forms at different times.
o Function overloading
o Operator overloading
o Method overloading
1.3.4 Inheritance
A class is a category of objects. An object is an instance of a class. As an instance of a
class, an object that has all the characteristics on its class. This is inheritance. The
main types of inheritance are:
Public Inheritance
PUBUDU KAVISHKA 8
Object Oriented Programming Sarasavi Information System
Private Inheritance
Protected Inheritance
1.3.5 Objects
An object is an abstract representation of a thing in the physical world. It can also be
said that an object is any item that can be individually selected and manipulated. This
can be real world objects and intangible objects. In object oriented programming
everything in the code is treated as an object. Objects are unique instances of classes
with attributes and behaviors. For example:
1.3.6 Classes
A class can be simply called as a template for a certain amount of objects. A class
contain all the properties of a group of objects that the class is related to. A class can
have many subclasses that can inherit all or some of the characteristics and
properties of the main class. A class is a blueprint for objects.
1.3.7 Destruction
This method is used to destroy and cleanup objects when they are not needed.
PUBUDU KAVISHKA 9
Object Oriented Programming Sarasavi Information System
2 Task 2
2.1 Classes of Sarasavi Information System
2.1.1 Class Library
Library
- Name: String
+ Issue Books()
Attribute(s)
o Name
Method(s)
o Issue_Books()
PUBUDU KAVISHKA 10
Object Oriented Programming Sarasavi Information System
Reader
#User_ID: Integer
- Name: String
- Gender: String
- Number of Books : Integer
- Address: Alphanumeric
- NIC Number: Alphanumeric
- Type: String
+ Read()
Name – Reader
Attributes
o User_ID
o Name
o Gender
o Number of Books
o Address
o NIC Number
o Type
Method
o Read()
This class also has two sub-classes, they are: Registered Members
Registered Visitors
PUBUDU KAVISHKA 11
Object Oriented Programming Sarasavi Information System
Registered Member
#User_ID: Integer
- Name: String
- Gender: String
- Number of Books : Integer
- Address: Alphanumeric
- NIC Number: Alphanumeric
+ Refer_Books()
+ Borrow_Books()
Table 3: Sub-Class Registered Member
Attributes
o User_ID
o Name
o Gender
o Number of Books
o Address
o NIC Number
Method
o Refer_Books()
o Borrow_Books()
PUBUDU KAVISHKA 12
Object Oriented Programming Sarasavi Information System
Registered Visitor
#User_ID: Integer
- Name: String
- Gender: String
- Address: Alphanumeric
- NIC Number: Alphanumeric
+ Refer_Books()
Attributes
o User_ID
o Name
o Gender
o Address
o NIC Number
Method
o Refer_Books()
PUBUDU KAVISHKA 13
Object Oriented Programming Sarasavi Information System
Library Card
#User_ID: Integer
- Name: String
- Expiry_Date: Date
+ Refer_Books()
+ Borrow_Books()
Table 5: Class Library Card
Attributes
o User_ID
o Name
o Expiry_Date
Method
o Refer_Books()
o Borrow_Books()
PUBUDU KAVISHKA 14
Object Oriented Programming Sarasavi Information System
Librarian
#Librarian_ID: Integer
- Name: String
+ Update_Details()
Name – Librarian
Attributes
o Librarian _ID
o Name
Method
o Update_Details()
PUBUDU KAVISHKA 15
Object Oriented Programming Sarasavi Information System
Book
#Book_ID: Alphanumeric
- Title: String
- ISBN: Alphanumeric
- Publisher: String
- Type: String
- Quantity: Integer
+ Issue()
Name – Book
Attributes
o Book_ID
o Title
o ISBN
o Publisher
o Type
o Quantity
Method
o Issue()
PUBUDU KAVISHKA 16
Object Oriented Programming Sarasavi Information System
3 Task 3
3.1 Use case Diagram
PUBUDU KAVISHKA 17
Object Oriented Programming Sarasavi Information System
3.3
PUBUDU KAVISHKA 18
Object Oriented Programming Sarasavi Information System
4 Task 5
4.1 Usage of Control Structures
4.1.1 Startup Menu
PUBUDU KAVISHKA 19
Object Oriented Programming Sarasavi Information System
This control structure checks whether the login credentials are corrects and
lets the administrator to login to the system.
PUBUDU KAVISHKA 20
Object Oriented Programming Sarasavi Information System
This control structure checks whether the Boolean values title and publisher are true
and executes the code under the relevant statement.
PUBUDU KAVISHKA 21
Object Oriented Programming Sarasavi Information System
Task 6
o Text Editor
o Debugger
o Compiler
o Graphical User Interface (GUI) designer
Visual Studio
Pycharm
Netbeans
Brackets
PHPStorm
PUBUDU KAVISHKA 22
Object Oriented Programming Sarasavi Information System
4.2.2 The IDE used in the development of the Sarasavi Information System
The IDE used in the development of the Sarasavi Library System is Visual Studio
2013 Ultimate.
C
C++
C#
VB.net
ASP.net
Etc.
Code Editor
Debugger
Designer
PUBUDU KAVISHKA 23
Object Oriented Programming Sarasavi Information System
4.2.3.1.2 Debugger
A debugger is an application which helps in debugging the program. The default
debugger that comes with Visual Studio supports all .net programming languages and
it works as a Source-level debugger as well as a Machine-level debugger. It also can
be attached to processes and debug them while they run.
4.2.3.1.3 Designer
A designer is the component of the IDE which allows the developer to develop the
Graphical User Interface (GUI) of the system. Visual Studio 2013 has a very powerful
designer which host many unique features, like:
The most noteworthy feature of the designer is the WPS which allows the developer
to drag and drop various tools such as Textboxes, Buttons, etc. on to the developing
windows form, this feature greatly improves the ease the work of the developer.
Other than the above given features this IDE has an onboard event and error handler
which uses a user friendly interface that makes the troubleshooting process easier.
PUBUDU KAVISHKA 24
Object Oriented Programming Sarasavi Information System
4.2.3.1.4 Screenshots
PUBUDU KAVISHKA 25
Object Oriented Programming Sarasavi Information System
5 Task 9
5.1 Questionaries’
1) Are all the requirements satisfied using the system?
Yes No
2) Do you feel comfortable with the user interface?
Yes No
3) Do you want this system to be more user friendly?
Yes No
4) Do you think this system is practical?
Yes No
PUBUDU KAVISHKA 26
Object Oriented Programming Sarasavi Information System
PUBUDU KAVISHKA 27
Object Oriented Programming Sarasavi Information System
5.2 Feedback
Name Q.1 Q.2 Q.3 Q.4 Q.5 Q.6 Q.7
Miss. Melisha Fernando Yes Yes No Yes Yes Yes High
Mr. Kabilan Viswanathan Yes Yes Yes Yes Yes Yes Medium
Name Q.8
Miss. Melisha Fernando Make the system a bit more user friendly and
Secure.
Table 9: Feedback 8
PUBUDU KAVISHKA 28
Object Oriented Programming Sarasavi Information System
Name Q.9
Miss. Melisha Fernando None
Name Q.10
Miss. Melisha Fernando Splash Screen
5.2.1
PUBUDU KAVISHKA 29
Object Oriented Programming Sarasavi Information System
References
Anonymous, n.d. Computer Systems. [Online]
Available at: www.cs.drexel.edu/~introcs/Fa12/notes/06.1OOP/Advantages.html
[Accessed 2015].
Anonymous, n.d. Webopedia. [Online]
Available at: http://www.webopedia.com/TERM/O/object.html
[Accessed 2016].
Esoft, n.d. Object Oriented Programming with .net. s.l.:Esoft.
I, R., n.d. Quora. [Online]
Available at: www.quora.com
[Accessed 2015].
Lewallen, R., 2005. Code Better. [Online]
Available at: codebetter.com/raymondlewallen/2005/07/19/4-major-principles-of-
object-oriented-programming/
[Accessed 2015].
Microsoft, n.d. Introducing Visual Studio. [Online]
Available at: http://msdn.microsoft.com/en-us/library/fx6bk1f4(v=vs.90).aspx
[Accessed 2016].
Rouse, M., 2005. WhatIs. [Online]
Available at: http://whatis.techtarget.com/definition/class
[Accessed 2016].
PUBUDU KAVISHKA 30