You are on page 1of 30

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/337224672

Object-Oriented Development with Java

Thesis · November 2019


DOI: 10.13140/RG.2.2.12350.84805

CITATIONS READS
0 27,628

1 author:

Alfred Tan Yik Ern


Asia Pacific University of Technology and Innovation
29 PUBLICATIONS 1 CITATION

SEE PROFILE

All content following this page was uploaded by Alfred Tan Yik Ern on 13 November 2019.

The user has requested enhancement of the downloaded file.


CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Student Name : Tan Yik Ern


Coursework Title : ONLINE SHOPPING MANAGEMENT SYSTEM
Module Code : CT038-3-2-OODJ
Student Number : TP046566
Intake Code : UC2F1805IT(ISS)
Lecturer Name : LEE KIM KEONG
Hand out Date : 5 August 2018
Hand in Date : 20 August 2018

1
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Contents
Introduction .................................................................................................................................................. 3
Requirement Analysis ................................................................................................................................... 4
Used case diagram .................................................................................................................................... 4
Class diagram .......................................................................................................................................... 11
Activity diagram ...................................................................................................................................... 12
User access.................................................................................................................................................. 19
Product and customer management ...................................................................................................... 19
Order and order item management ....................................................................................................... 19
Coding snapshot.......................................................................................................................................... 20
Snapshot ................................................................................................................................................. 20
GUI snapshot ........................................................................................................................................... 24
Conclusion ................................................................................................................................................... 29
Bibliography ................................................................................................................................................ 29

2
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Introduction
This project is about online shopping management system that build with Java programming.
The objective to build online shopping system is to promote e – commerce business. The project
will be a online book store to sell the book on this project when it complete done.
The customers could add the book to the shopping cart, the shopping cart is a virtual store on the
internet. After that, customers could check out all the item that showed in the shopping cart. At
that stage, customer have to fill up a billing address, a shipping address and payment information
such as credit card number. At last the tracking number and the order product will send to the
customer’s email.
Besides that, the function of admin in this project could be add customer and manager, delete the
customer and manager, edit the information of customer and manager, view the customer and
manager’s details and search the customer and manager’s account.
Third, manager is work for manage the order and product in this online shopping management
system. manager could add the order for customer, delete the ordered that order by customer, edit
the details and in formation, view all the orders and search for orders. Next, manager could be
also adding the product, delete the product, edit the product, view the product and search the
product.

3
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Requirement Analysis
Used case diagram

Figure 1: Complete used case diagram of online shopping system

4
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 2: Register, login and logout online shopping system used case diagram
Description: There have 3 users for this online shopping system, there are customer, manager
and admin. Firstly, customer should register an account in this online shopping system, then
customer could login and logout system. Input first name, last name, email, password. Login
with email and password in online shopping system. Secondly, manager and admin are same
functionality, there are login and logout.

5
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 3: Customer in online shopping system used case diagram


Description: Customer could register an account before proceed to purchase products. After
create an account, customer could be login and logout the online shopping system. Moreover,
customer able to search for the product that customer like to buy. Then, customer could add
product to cart before proceed to payment step. Finally, display the bill of the total payment to
customer.

6
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 4: Admin in online shopping system used case diagram 1


Description: Admin logins account and then able go to manage customer account in online
shopping system. There have 5 function in admin system, such as add, delete, edit, view and
search. The admin could help customer to create a new account, delete customer account if
necessary, edit and change customer account’s information, view customer account according
user ID or alphabet and search for a specific customer account. Last but not least, admin could
logout the account.

7
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 5: Admin in online shopping system used case diagram 2


Description: Admin logins account and then able go to manage manager account in online
shopping system. There have 5 function in admin system, such as add, delete, edit, view and
search. The admin could help manager to create a new account, delete manager account if
necessary, edit and change manager account’s information, view manager account according
user ID or alphabet and search for a specific manager account. Last but not least, admin could
logout the account.

8
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 6: Manager in online shopping system used case diagram 1


Description: Manager logins account and then able go to manage product system in online
shopping system. There have 5 function in admin system, such as add, delete, edit, view and
search. The manager could update and add products in system, delete the products if necessary,
edit and change products’ details, view products according item ID or alphabet and search for a
specific product. Last but not least, manager could logout the account.

9
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 7: Manager in online shopping system used case diagram 2


Description: Manager logins account and then able go to manage order system in online
shopping system. There have 5 function in admin system, such as add, delete, edit, view and
search. The manager could update and add order by customers in system, delete the order items
if necessary, edit and change order’s details, view order items according item ID or alphabet and
search for a specific order by customers. Last but not least, manager could logout the account.

10
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Class diagram

Figure 1: Complete class diagram of online shopping system

11
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Activity diagram

Figure 1: Complete activity diagram of how customer purchase a product in online shopping
system.

12
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 2: User login online shopping system activity diagram

13
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 3: Customer’s search product activity diagram

14
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 4: Admin register the manager account activity diagram

15
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 5: Admin edited manager account activity diagram

16
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 6: manager add product into the online shopping system.

17
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 7: manager add order into the online shopping system.

18
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

User access
Product and customer management
The product sell in this online shopping management system are about hacking and computing
book. In this online book stores we have sell 20 various type of book. All the books are mark
with price. The customers could view the description about the book that make customers have a
brief about the book before purchase the book. The customers could but more than a book at a
time or various type of book at a time.
Besides that, the customers could add the product to cart before check out the product. The
customer also able to proceed to check out, before that have to fill in payment details. After
completed it, the customers allowed to check out the product.
In shopping cart, the customers could remove the product that customers not willing to check out
or remove the quantity of the specific product. Not only to make change on shopping, customers
also able to change the customer’s profile in the online shopping system.

Order and order item management


The order system is managed by manager in online shopping management system. The ordered
is made by customers then the manager will do manage the order item that made by customers.
Each item has their own product ID according to the customers that add to the shopping cart.
Manager could help customer to add order item in the online shopping management system or
delete the previous order item. Besides that, manager could edit the order item. For example, a
customer made a minor mistake on order item, the manager could edit the order item. The order
item management system has a search function that simply filter the important order item in the
table form. The manager has type in product ID or item name in the search box of order item
management system.

19
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Coding snapshot

Snapshot
1) header file

Source code written in Java is simple. There is no preprocessor, no #define and related
capabilities, no typedef, and absent those features, no longer any need for header files.

2) Package

Package GUI, all the user interface is keep in that file.

3) Class

A class is a blueprint from which individual objects are created.

Instance variables are variables within a class but outside any method. These variables are
initialized when the class is instantiated.

20
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Class variables are variables declared within a class, outside any method, with the static keyword.
Example: static String filename1;

4) Object

A class provides the blueprints for objects and an object is created from a class. In Java, the new keyword
is used to create new objects.

5) Method

Method meant consists of a method header and a method body. The same is shown in the
following syntax.

21
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Example:
6) Constructor

A constructor doesn’t have a return type. A constructor allows to provide initial values for class
fields when you create the object.

7) Inheritance

Inheritance in Java is a mechanism in which one object acquires all the properties and behaviors
of a parent object.

8) Overloading

Method Overloading is a feature that allows a class to have more than one method having the
same name if their argument lists are different.

22
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

9) Overriding

If a class inherits a method from its superclass, then there is a chance to override the method if
it is not marked final.

10) exception handling (try/ catch, finally, throw)

The try block contains set of statements where an exception can occur. A try block is always
followed by a catch block, which handles the exception that occurs in associated try block.

11) Abstract

In Object-oriented programming, abstraction is a process of hiding the implementation details


from the user, only the functionality will be provided to the user.

12)

An interface is a reference type in Java. It is like class.

23
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

GUI snapshot

Figure 1: Online shopping system login page


This is the main system main page, the admin, manager, customer to login their own account via
this GUI. But Admin will log in to the admin management system page, manager will login to
manager management system page and customer will login to online shopping page.

24
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 2: Online shopping system admin management account


Description: how admin used this system to manage the customer account.
Admin should fill in customer ID, name, username, password, address, birthday, contact number
and role to add a customer account table. Admin also available to edit the information of the
customer in customer management system. Moreover, admin also could delete the customer
account in the table. The function “Load All Users” button is to display all the users, due to when
admin log in to management system without view the users and the second function is refresh all
the users and new entry users. The last function is customer could search the customer account.

Description: how admin used this system to manage the manager account.
Admin should fill in manager ID, name, username, password, address, birthday, contact number
and role to add into management table. Admin also available to edit the information of the
manager in customer management system. Moreover, admin also could delete the manager
account in the table. The function “Load All Users” button is to display all the users, due to when
admin log in to management system without view the users and the second function is refresh all
the users and new entry users. The last function is admin could search the manager account.

25
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 3: Product management system


Description: how manager manage the product in online shopping management system
This is a product management system that used by manager. Manager should fill in product ID,
product name, fragile and rate add to the product management table. Manager also available to
edit the information of the product in product management system. Moreover, manager also
could delete the product in product management system. The last function is manager could
search the product in search box. Finished the manage product progress, manager could log out
their account.

26
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 4: Order management system


Description: how manager manage the order in online shopping management system
This is an order management system that used by manager. Manager should fill in order ID,
customer ID and product list add to the order management table. Manager also available to edit
the information of the order in order management system. Moreover, manager also could delete
the order in order management system. The last function is manager could search the order in
search box. Finished the manage order progress, manager could log out their account.

27
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Figure 5: Online shopping platform


Description: How customer add a product into shopping system
The product lists will show all the product in online shopping system. Customer could add the
product into the shopping cart. At the bottom, the system will show the total amount to customer.
Lastly, click the “Order” button, meant to customer confirm purchase this product. After that,
customer could log out the online shopping system.

28
CT038-3-2-OODJ TP046566 UC2F1805IT(ISS)

Conclusion
In conclusion, this is an online shopping management system that build with Java programming.
This system is designed to benefits of customers able to online shopping at anywhere and
anytime.
The internet has become a major resource at current era, online shopping not only benefits for
customer, also significant for entrepreneur to make their business. Meanwhile, online shopping
has to stronger the security, due to the online shopping have numerous customers’ information
there. Secure the information with security code and algorithm in online shopping.
A good online shopping design must be accompanied with user-friendly online shopping
application logic. The whole online shopping design should advantage for the customers to view
the contents of their cart and to be able to add or evacuate products to their cart. The online
shopping application have to add features that make the customers more comfortable.

Bibliography
Barry Burd, P. ( 2017). Beginning programming with Java for dummies. John Wiley and Sons.

How to add row in JTable? (n.d.). Retrieved from Stackoverflow:


https://stackoverflow.com/questions/3549206/how-to-add-row-in-jtable

How to create a search method for an array. (n.d.). Retrieved from Stackoverflow:
https://stackoverflow.com/questions/29686685/how-to-create-a-search-method-for-an-array

Java Tutorial - How To Populate JTable From ArrayList In Java Using NetBeans [With Source Code].
(2016). Retrieved from Youtube: https://www.youtube.com/watch?v=GAl1FSKvoFY

Shopping Cart Project in Java w/ Source Codes. (n.d.). Retrieved from Youtube:
https://www.youtube.com/watch?v=UVw7neMnN34

Shopping Mall Management System - CBSE ip Project for Class 12 (Java Netbeans and MySql). (n.d.).
Retrieved from Youtube: https://www.youtube.com/watch?v=Rhhw9OWx3HM

Tsvetinov, N. (2015). Learning reactive programming with Java 8: learn how to use RxJava and its
reactive observables to build fast, concurrent, and powerful applications through detailed
examples. Packt Publishing Ltd.

29

View publication stats

You might also like