Oodj Apu
Oodj Apu
Oodj Apu
Student ID : TP047991
Intake : UC2F1708IT(BIS)
1
Table of Contents
1.0 Introduction............................................................................................................... 1
2.0 Requirement Analysis
2.1 Use-Case Diagram ……………………………………………………...... 2
2.2 Class Diagram …………………………………………………………. 3–4
2.3 Activity Diagram – Add User …………………………………………. 5
2.4 Activity Diagram – Add Item …………………………………………. 5
2.5 Activity Diagram – Add Supplier ………………………………………. 6
2.6 Activity Diagram – Generate Purchase Requisition (PO) ………..…….. 6
2.7 Activity Diagram – Generate Purchase Order (PO) …………………….. 7
3.0 Implementation
3.1 Encapsulation …………………………………………………………….. 8
3.2 Inheritance ……………………………………………………………….. 9
3.3 Polymorphism …………………………………………………………… 10
3.4 Interface …………………………………………………………………. 11
3.5 Overriding ……………………………………………………………….. 12
3.6 Overloading ……………………………………………………………… 12
4.0 Conclusion……………………………………………………………………….. 13
5.0 Reference ………………………………………………………………………… 12
2
1.0 Introduction
The objective for the assignment is to develop the practical ability to describe, justify,
and implement an Object-oriented system in the form of classes, arrays, polymorphism,
inheritance and many more. This system is created through Java Programming Language with
the help of software development platform which is IntelliJ IDEA. This platform provides an
advanced features and interesting development environment which allows us to debug the code
and having friendly interfaces. Aligned with the aim of this given project, there are several
objectives to be achieved such as providing users, user-friendly interface to ensure of use
throughout the use of the system. Besides that, progressing into a computerised and systematic
process handling transactions and data storage is another objective. Through the practice of this
system, transferring of information between administrator, purchase and sales manager are
made easy.
1
2.0 Requirement Analysis
This diagram above shows the Purchase Order Manager use-case UML diagram that
consists the actor which is the user of the system. For example, in this diagram, it has
Administrator, Purchase Manager and Sales Manager. Secondly, it describes set of action
which is use-case that the system could perform with actors of the system. It is a specialization
of a class diagram and a structured diagram as a special case of class diagram where classifiers
are to be restricted to be either actor or use-case related to each other with association
(Fakhroutdinov, 2009-2016). For instance, in this diagram, it has “Add User” function and
other function as shown below inside the use-case symbol (oval).
2
2.2 Class Diagram
3
This diagram above shows the Purchase Order Management class diagram. It is a
structured UML diagram which shows structured of a design system which consist of classes,
interfaces and relationships. The classes and interface diagram contains the name, attribute and
operation of the class while the relationships of the class contain the type of relationship which
are generalization, association, composition, dependencies and multiplicity.
Inside the classes and interface diagram, the name must be noun phrases for example
on the diagram shown above, one of the implementation is Users and another implementation
is the capitalization of class name which is “UserFileStore”. Secondly, the attributes are what
an object known as and one of the implementation is the declaration of “uFName”, “uName”,
“uPswd”, “uAccess” inside the Users class. Lastly, operation defines the object action for
instance on the diagram shown above, the implementation is “userAdd” which this operation
is to add the user into the system.
The relationship implementation is generalization which is cover possible classes that
doesn’t have any corresponding objects such as the Administrator could manage the item.
Secondly, the implementation of association is defining the link of the object. For example,
administrator could manage the item. Thirdly, composition is one of the implementation. It’s
form of aggregation that the part is exclusively owned by the whole and its lifecycle is
dependent on the lifecycle of the whole. For example, Purchase Order is the composition of
Purchase Requisition which is to generate the Purchase Order, it required the data from
Purchase Requisition. Without it, it couldn’t generate at all. Fourthly, dependencies are also the
implementation. It means that the class at the source end of the relationship has some sort of
dependency on the class at the target end of the relationship. (Vernon, 2004). For example, the
“Users” class dependencies with “UserFileStore” which it depends another classes for data
storage. Finally, multiplicity is one of the implementation. It specifies how many instances of
a class could associate with instances of another class. For example, an Administrator could
add many items into the system and it’s one to many relationship (1...*).
4
2.3 Activity Diagram – Add User
[false]
[false]
Do they wish to
terminate the Do they wish to insert Check either the supplier
Check either the item code
program another item code is exist
is exist
[true] [false] [true] [false] Add Item
[true]
[false] [true]
[false]
[false]
Do they wish to
terminate the Do they wish to insert Check either the supplier
Check either the item code
program another item code is exist
is exist
[true] [false] [true] [false] Add Item
[true]
[false] [true]
5
2.5 Activity Diagram – Edit Supplier
[false]
Manage
Log In Authentication [true] Menu Display
Supplier
[false]
[does the user wish to terminate the program] [check either the
supplier code exist]
[true] [true] Edit Supplier
[false]
[false]
Manage Purchase
Log In Authentication [true] Menu Display
Requisition
[false]
Does the user wish to Does the user wish to add Check either the required
terminate the program another PR data is exist and valid Create Purchase
[true] [false] [true] Requisition
[true] [false]
6
2.7 Activity Diagram – Generate Purchase Order(PO)
[false]
[false]
Does the user wish to Does the user wish to add Check either the required
terminate the program another PO data is exist and valid Generate Purchase
[true] [false] [true] Order
[true] [false]
This is an activity diagram which shows flow of control with emphasize the sequence of the
flow. It consists of initial and final node, action node, decision node and activity edge. Initial
node is a node where it starts the system while final node is where it terminates the system and
it notated as round circle. For instance, at the diagram above, the green node is the initial node
while the grey node is the final node. Secondly, action node is named element which represents
an action and it notated as round-cornered rectangle. For example, in the diagram, it shows an
action such as Log In and others. Thirdly, decision node is a control node that accept one or
more incoming edge(s) and contains outgoing edge from one or more outgoing flows. For
instance, in the diagram shown above, after the authentication, it proceeds to decision node
where it verified the user credentials. If the credentials match, it will proceed with true while if
the credentials un-match, it will proceed with false at finally it terminates the program. Lastly,
activity edge is an abstract class for the directed connections along which data objects flow
between activity nodes. For instance, in the diagram 2.4 above, after the “Add Item” activity
node, it connects to the edge that “Check either the item code is exist” and it will flow to the
next action. (Fakhroutdinov, 2009-2016)
7
3.0 Implementation
3.1 Encapsulation
8
3.2 Inheritance
9
3.3 Polymorphism
10
3.4 Interface
11
3.5 Overriding
3.6 Overloading
12
4.0 Conclusion
To conclude, the goals and aim of this assignment were achieved as all requirements
assigned have been met. Deeper understanding and knowledge were gained when developing
the system and completing the documentation of this project. Although, there were some
challenges faced and enhancement that could be done on the project.
The challenges faced during the development of project are Java considered to have
large knowledge base and to implement it, it takes time. It has developed by using quite simple
function due to time constrains. It also developed to store data into text file which is quite easy
to implement. Although it’s easy to implement, but it still need deep validation in order to make
sure that it stores the data accurately.
The enhancement that could implement in future are implementation of database system
so that it could store and access the data more accurately and also it could synchronize the data
up to date. Finally, implements of Java Graphic User Interfaces (GUI) so that it provides user-
friendly interfaces and it makes the user comfortable to use it.
13
5.0 References
Fakhroutdinov, K., 2009-2016. Activity Diagrams. [Online]
Available at: http://www.uml-diagrams.org/activity-diagrams.html
[Accessed 3 November 2017].
James Gosling, B. J. S. B., 1996-2000. Method Declarations. In: The Java Language Specifications.
California: Sun Microsystem, pp. 1-390.
Rivera, J. N., 2017. Simple CRUD (Add, Edit, Delete and View) in JAVA using .TXT(text) file as
database. [Online]
Available at: http://www.codeinquirer.com/simple-crud-add-edit-delete-and-view-in-java-using-
txttext-file-as-database/
[Accessed 29 September 2017].
Rizvi, S. F. M., 2017. Validation & Verification [Interview] (19 October 2017).
14