Upload
dani-akemdu
View
468
Download
0
Embed Size (px)
DESCRIPTION
OODJ
Citation preview
Dani Akemdu (TP01835) Object Oriented Development with Java
Table of ContentsIntroduction...........................................................................................................................................2
UML Diagram.......................................................................................................................................3
Use Case Diagram.............................................................................................................................3
Class Diagram...................................................................................................................................4
Sequence Diagram.............................................................................................................................5
Object Oriented Programming Concept.................................................................................................6
Classes...............................................................................................................................................7
Objects...............................................................................................................................................8
Constructor........................................................................................................................................9
Inheritance.......................................................................................................................................10
Polymorphism.................................................................................................................................11
Encapsulation..................................................................................................................................12
Screenshots..........................................................................................................................................13
LOGIN........................................................................................................................................13
MAIN MENU..............................................................................................................................13
ADMINISTRATOR MENU........................................................................................................14
ADMINISTRATIVE STAFF MENU..........................................................................................14
ACADEMIC STAFF MENU......................................................................................................15
STUDENT MENU......................................................................................................................15
Limitation............................................................................................................................................16
Future Enhancement............................................................................................................................17
Conclusion...........................................................................................................................................18
References...........................................................................................................................................19
1
Dani Akemdu (TP01835) Object Oriented Development with Java
Introduction
Student Grade Management System is an application to mantain student exam details
for university. The main purposes of thi application is to store and edit the complete personal
record and examination record of each student. There are four users type which has different
access priority. They are administrators, lectures, administrative staff and student. In this
system, administator has the highest access priority which enable him or her to perform al the
functions. The administator is able to add, delete, edit search and update all records. The
second users are lecture, in charge of a module has the right to enter, view, delete, and edit
marks for given module. Then, administrative staff only has limited functions which are view
and search student details. The last users are students who able to view their assigment and
ecamination marks and module details. The project has taken advantages of the object
oriented programming concept. The system has flexible design easily tp understood and
customized to enhance the system.
2
Dani Akemdu (TP01835) Object Oriented Development with Java
UML Diagram
Use Case Diagram
3
Dani Akemdu (TP01835) Object Oriented Development with Java
Class Diagram
4
Dani Akemdu (TP01835) Object Oriented Development with Java
Sequence Diagram
5
Dani Akemdu (TP01835) Object Oriented Development with Java
Object Oriented Programming Concept
Nowadays many modern language support Object Oriented Programming (OOP). In
OOP all data are encapsulated and control of data members is protected by the class, and
makes programmer able to monitor how the data is accessed and manipulated. Object
Oriented Programming makes software easier to build, maintain, modify and reuse. In OOP
Concept, everything is grouped into sustainable objects and this Concept is also known as the
Class-based programming language. There are some basic concepts make the program
become Object Oriented Programming. They are Classes, Objects, Encapsulation,
Constructor, Inheritance, Polymorphism, and Nested Classes.
There are several advantages of using Object Oriented Concept. First of all is
inheritance, the inheritance technique makes programmer able to eliminate the redundant
code and extend the existing class to use. Second advantage of Object Oriented Programming
concept is easy to divide the work because the project based on the objects. (Johnson.P,
Lancaster.A, 1999). Third advantage is encapsulation, this technique helps programmer to
build different access of priority and secure program by implementing encapsulation. Last
advantages of OOP concept is allowed the program to upgrade easily from small to large
system. An overview of my research about OOP Concept will be explained further.
6
Dani Akemdu (TP01835) Object Oriented Development with Java
ClassesClasses are constructs that define objects of the same type. A java class uses variable
to define data fields and methods to define behaviors. As an example in the real world, there
are many individual objects all the same kind, like there may be thousand various of car in
existence. Each car has built from the same blueprint. So, in object oriented terms, the car is
an existence of an object known as car. It intentionally focuses on the basics, showing how
even simple classes can cleanly model state and behavior. The class is created by using the
code ‘class’.
Example :
7
Dani Akemdu (TP01835) Object Oriented Development with Java
Objects
Object-oriented programming involves programming using objects. Object is an
instance of class which performs a set of related activities. In other word, an object is an
instance of a class which represent a group of similar object. When the object is createdm that
object is able to act as an instance of class that objects represent. An object is created by
using code ‘new’.
Example :
Constructor
Java constructor is
a method that has the same name as the class name (Deitel.M.Harvey. Deitel.J.Paul, 2002, pg
394). Within a constructor method, it does not include any return type; it is because
constructor does not return any values. The constructor is used to initialize the instance
variable of an object. Constructor is different from the methods, point over here are few
things about the constructor.
It must have the same name with the class name. Class name is equals to the
constructor name
It is automatically created the default constructor when the programmer does not
define constructor for a class. The default constructor in created by the compiler.
The differences between constructor and methods are:
o Constructor does not have any return type while the methods have the return
type.
o There is no statement implemented in constructor while the methods have.
8
Dani Akemdu (TP01835) Object Oriented Development with Java
Using the keyword "super" in Constructor is use to call the constructor in parent class.
It must state at the first line in the body of a constructor.
Using the keyword "this" is used to calls another constructor within same class.
Example:
InheritanceInheritance means that defining relationship between a super class and its subclass.
Inheritance creates a new class definition building upon an existing definition (extends the
original class). The code "extends" is used in this technique to extend the existing class from
the new class. As an example; the child class extends the parent class, so everything that
parent can do, the child class also can perform like parent class. This is how the inheritance
creates relationship between classes. In other word, the subclass can use whatever an object
in the super class. This section explains how classes inherit state and behavior from their
super classes, and explains how to derive one class from another using the simple syntax
provided by the Java programming language.
Example:
9
Dani Akemdu (TP01835) Object Oriented Development with Java
Polymorphism
Polymorphism plays an important role in allowing objects having different internal
structures to share the same external interface. Polymorphism is a technique to request the
same operation be performed by a wide range of different types of things. This technique
allows method to have the same name to act or perform differently within the same class
family. In OOP concept, the Polymorphism is achieved by different techniques, Method
overloading, operator overloading, and method overriding. Polymorphism shown below is
implemented using the method Overloading technique. It has 2 methods that has the same
name which is set and get methods that perform different function. This shows how the
Polymorphism is implemented in the programming to make extensible for the methods.
Example:
10
Dani Akemdu (TP01835) Object Oriented Development with Java
11
Dani Akemdu (TP01835) Object Oriented Development with Java
Encapsulation
Encapsulation or also known as information Hiding is a technique in Object Oriented
Programming Language to combined the data and action or methods into single item and hide
the details of implementation (Tutorial Point, 2010). Meaning that, the class is like a
container or capsules which hide the set of methods, attributes and properties. Some
keywords in encapsulation are private and protected. Private access modifier cannot be use
anywhere outside of the class. To get an access to access private field, it has to create a public
field’s getter method to access from other class. Protected access modifier is slightly much
more not strict, it can access from other class as long as it is in the same package.
Example:
12
Dani Akemdu (TP01835) Object Oriented Development with Java
Screenshots
LOGIN
This is the login system, if users input valid username and password, the system will go
through to the main menu
MAIN MENU
This is the main menu for administrator, the highest access control of this system can perfom
all feature.
13
Dani Akemdu (TP01835) Object Oriented Development with Java
ADMINISTRATOR MENU
Administrator menu which is provides the user within the authority to create new
administrator, admin staff, lecturer and student into the system.
ADMINISTRATIVE STAFF MENU
This is Administrative Staff Menu, where the system allows the user to search and view
student information includes module details.
14
Dani Akemdu (TP01835) Object Oriented Development with Java
ACADEMIC STAFF MENU
This menu shows that Academic Staff user which is lecturer able to search, edit and delete
module mark.
STUDENT MENU
These are the student function. Student use is able to view module and module mark.
15
Dani Akemdu (TP01835) Object Oriented Development with Java
Limitation
There are some limitations which can be found in the system. The first limitation of
the system is when the system is closed all the data will be lost. Since the program is not
using a database to store the input, the program only keeps the data using the Vector where
once the program exit or stop running, the data also lost. Second limitation is this system not
GUI application, which is not really user friendly.
16
Dani Akemdu (TP01835) Object Oriented Development with Java
Future Enhancement
To make the system become better in the future, the programmer has chosen several
points as enhancement to be developed:
o Connecting system with database to keep and store the user record which can be
permanently store in the database.
o Implementing Graphical User Interface to make an interactive user friendly system.
o Advancing the Object Oriented Concept into the system developing to make the system
more extensible.
17
Dani Akemdu (TP01835) Object Oriented Development with Java
Conclusion
This assignment main purpose is to develop an application to maintain student exam
details for a university. The system can help people in University environment to find what
they need, to store and keep track the record. This Student Grade Management System will
be very useful for the user because it helps the staff and administrator to manage all records
in the system, helps student to view the module detail and help lecturer to store the module
marks to the system with different level of user access. In implementation users has much
flexibility to run this program because every user has different access control to perform
selected feature in the system. In conclusion object oriented programming concept is high
reusability.
18
Dani Akemdu (TP01835) Object Oriented Development with Java
References
Deitel.M.Harvey, Deitel.J.Paul, (2002), Object Base Programming. In: n.d Java How
to Program. 4th ed. USA: Prentice Hall. 394-395, 472
Hariyanto,B., Esensi-esensi bahasa pemograman JAVA.3rd ed. Bandung:
Informatika
Java with object oriented programming and world wide web application “PAUL S.WANG” 1998
Johnson.P, Lancaster.A, (1999), the Advantages of Object Oriented Programming [online], Available:http://pj.freefaculty.org/Swarm/Beta/SwarmUserGuide/swarm.user.user1.02-obj-adv.sect1.html, Last accessed [4th May 2012]
Rob M., 2004, Issues of Structured vs. Object Oriented Methodologies of Systems
Analysis and Design, [online], Available from
http://www.iacis.org/iis/2004_iis/PDFfiles/Rob.pdf [Accessed 10th May 2011]
Tutorial Point, (2010), Java – Encapsulation [online], Available:
http://www.tutorialspoint.com/java/java_encapsulation.htm, Last accessed [12th May
2011]
19