Java Assignment Individual
Java Assignment Individual
CT038-3.5-2-OODJ
OBJECT-ORIENTED DEVELOPMENT WITH JAVA
NP2F1901IT
HAND OUT DATE: 3 Feb 2019
HAND IN DATE: 24 May 2019
WEIGHTAGE: 50%
INSTRUCTIONS TO CANDIDATES:
2 Students are advised to underpin their answers with the use of References (cited
using the Harvard Name System of Referencing)
6 Where the assignment should be submitted in both hardcopy and softcopy, the
softcopy of the written assignment and source code (where appropriate) should
be on a CD in an envelope / CD cover and attached to the hardcopy.
Submitted To:
Further, we are grateful to our lecturer Mr. Aryan Thakur for his guidance and help to
complete this project. We would like to show our appreciation to all those who supported
us directly or indirectly to complete this project in given limited timeframe
Sincerely Yours’
Niroj Thapa
NP000199
Table of Contents
Acknowledgement.................................................................................................................
2. Problem Statement...........................................................................................................2
2.1 Objective....................................................................................................................2
2.2 Scope..........................................................................................................................2
3. Research Methodology....................................................................................................3
4. Software Development....................................................................................................5
5. Activity Diagram.............................................................................................................6
6. Class Diagram................................................................................................................10
9. Testing Strategies...........................................................................................................13
10.1 Class.......................................................................................................................14
10.2 Object.....................................................................................................................14
10.3 Abstraction.............................................................................................................15
10.4 Encapsulation.........................................................................................................15
10.5 Constructor............................................................................................................15
10.6 Polymorphism........................................................................................................15
10.7 Inheritance.............................................................................................................15
10.8 Interface.................................................................................................................16
11. Screenshots..................................................................................................................17
Conclusion.........................................................................................................................22
References..........................................................................................................................23
Table of Figure
Figure 1: Software Development Method...........................................................................4
Figure 2: Use Case Diagram................................................................................................6
Figure 3: Activity Diagram (Admin)...................................................................................7
Figure 4: Activity Diagram (Manager)................................................................................8
Figure 5: Activity Diagram (Customer)..............................................................................9
Figure 6: Class Diagram....................................................................................................10
Figure 7: Class...................................................................................................................14
Figure 8: Object.................................................................................................................14
Figure 9: Login Form.........................................................................................................17
Figure 10: Admin Page......................................................................................................18
Figure 11: Manager Form..................................................................................................19
Figure 12: Customer Management....................................................................................20
Figure 13: Cart...................................................................................................................20
Figure 14: Customer Home...............................................................................................21
Figure 15: Manager Form..................................................................................................21
1. Introduction (Online Shopping Management System)
Online shopping is the process whereby consumers directly buy goods or services form a
seller in a real time. Online shopping system is a virtual store on internet where customer
can browse the product and select their product of interest. Nowadays online shopping is
a common trend to buy goods. The online shopping management system includes all the
process like order, billing process, stock checking and delivery process along with other
recording information processes. This system helps to streamline the important entities
involved in an online shopping namely customers, orders and products.
This project aims to provide the advantages of online shopping to customers. Thus the
customer will get service of online shopping and home delivery from his favorite shop.
It is less user-friendly.
It is difficult to identify the required product.
Description of the product is limited.
Not in reach of distant users.
It is a time consuming process.
1
2. Problem Statement
As online shopping became a trend nowadays the regular shops are losing their customers
to online shop. The customers can have effortless shopping experience and save time
through online shopping. If the shops provide online portal for buying the products online
and get their products at their doors, it will increase the number of customers.
The main problem of existing system is online fraud along with privacy of the customers
where the hacker may attack the customer details.
2.1 Objective
The main objective of the proposed system is to reduce the shopping time and efficiency
in buying products. Some of the objectives of the online shopping management system
are as follows:
2.2 Scope
The online shopping management system is most widely used system in the internet. If
the shops provide online portal where their customer can shop from anywhere, the shops
won’t be losing any customer. Though the system may be unsafe but the users towards
online shopping is increasing rapidly which makes the scope of online shopping wider.
2
3. Research Methodology
The Research methodology is systematic plan for conducting research for both qualitative
and quantitative research for any project. Research methodology can be done by various
processes which are given below:
3
Figure 1: Software Development Method
4
The database should handle numerous data at the same time
4. Software Development
The software developments in the online shopping management system are designed
using different diagrams such as use case diagram and class diagram.
5
Figure 2: Use Case Diagram
5. Activity Diagram
The activity diagram is most important diagram in the UML as it describes the dynamic
aspect of the entire system. The activity diagram uses a flowchart to represent the flow
from one activity to another. The activity can be described as an operation of the system.
6
The basic purpose of this diagram is to capture the dynamic behavior of the system. The
activity diagram of the user in the system which is customer, manager and admin are
shown respectively:[CITATION Tut19 \t \l 1033 ]
The above diagram shows the work flow of the admin of the system where the admin can
perform the task that is manage manager account and manage customer account. The
admin is allowed to work on the manager and customer account.
7
5.2 Activity Diagram Manager
The above activity diagram of the manager shows the working criteria of the manager
which is specified as product and order. The adding, view, delete, edit and search of the
product as well as of the order is performed by the manager.
8
Figure 5: Activity Diagram (Customer)
The above activity diagram shows the activity of customer in the online shopping
management system. Here customer can search product, Add product and Display bill.
This tasks is performed on the system by customer and they logout of the system.
9
6. Class Diagram
The class diagram is the diagram that represents the static view of an application. The
class diagram is used for the construction of software application. The class diagram is
mainly used in the modeling of the object oriented system.
10
7. Hardware and Software Requirement
The hardware and software requirement are the main entity in this management system.
The hardware and software requirement are those requirement which helps the new
developed system.
Hardware Requirements
Hard Disk: 1 TB
RAM: 8 GB
Software Requirement
11
User Interface: HTML, CSS
12
8. Backup and Recovery
For the online shopping management system the back-up and recovery plans are handled
by the admin of the online shopping management system. This type of system can have
back-up with a prototype for the case of loss of original system. The recovery process is
easy as the data are saved in the txt files in the hardware.
Backup and recovery is the process of backing up data of the developed system in case of
loss and setting up a system that allows the data recovery due to data loss. Here the online
shopping management system is systematically arranged according to the work flow of
the online shopping which can have back up in web platform as well as in desktop with
an easy access of the data recovery.
13
9. Testing Strategies
Testing is done lastly after to make sure the applications can operate successfully over
multiple platforms. Testing is done through functional and non-functional methodology
to complete the release of a fully developed system. The software goes through functional
testing before the non-functional testing for final completion of a beta and final release.
We have chosen our system to go through the functional and non-functional testing
methodologies for final release.
1. Functional testing:
The functional testing is used for verifying each functions of the software if they can be
run in a specified consoles and systems. These testing include black box testing for
internal structure and design. Functional testing requirement the fulfillment of the
following methods:
Unit Testing
Integration testing
System testing
Acceptance testing
14
2. Non-functional testing:
Performance testing
Security testing
Usability testing
Compatibility testing
These procedural testing is done for checking the quality of a software and efficiency for
adoption to users to build strong framework that implements both functional and non-
functional testing methodologies.
10.1 Class
Java is an object-oriented programming language associated with class and object. The
class allows the work related only to that class. There are two types of class in object
oriented programming language that is:
Public class
Private class
15
Figure 7: Class
10.2 Object
The object is created from class in Java. An object is an entity that you can manipulate in
your program. The condition of an object is put away in fields (factors), while techniques
(capacities) show the item's conduct. [CITATION Hor10 \p 37-38 \l 1033 ]
Figure 8: Object
10.3 Abstraction
The process of finding the essential feature set for a building block of a program such as
class. In java Abstraction is achieved by using the abstraction classes and the interfaces.
As in abstraction the complex details are hidden that means the user will have the
information about what the object does instead how it does it.[CITATION Hor10 \p 82-
85 \l 1033 ]
10.4 Encapsulation
Encapsulation is the process of hiding implementation details. Encapsulation is very
important for problem solving. Encapsulation is also known as data hiding as to obtain
the encapsulation, variable is declared of a class as private and getter and setter method is
used to modify and view the values of the variables.
16
10.5 Constructor
Constructor is a method that initializes a newly instantiated object. A constructor is very
similar to a method, with two important differences.
The name of constructor is always the same as the name of the class.
Constructors have no return type.
10.6 Polymorphism
Polymorphism is the method among several methods that have the same name on the
basis of the actual types of the implicit parameters. When multiple classes implement the
same interface, each class implements the methods of the interface in different ways.
There are two types of polymorphism in java which are as follows:
10.7 Inheritance
The inheritance is a relationship between a more general superclass and a more
specialized subclass. Inheritance is the process in which one object acquires the
properties of the other object. The object from which the object acquires the properties is
known as the parent object. This practice helps in creating new classes built upon existing
classes.
10.8 Interface
Interface is a type with no instance variables, only abstract methods and constants.
Inheritance is the process in which one object acquires the properties of the other object.
The object from which the object acquires the properties is known as the parent object.
This practice helps in creating new classes built upon existing classes.
17
11. Screenshots
The screen shots of the Online Shopping Management System are given below:
18
Figure 9: Login Form
This is the main login page for the online shopping management system. The user name
and password for the three users are given below:
19
Figure 10: Admin Page
The above screenshot shows the admin page after logging in the system where the admin
can manage customer, view manager and view customer.
20
Figure 11: Manager Form
The above screen shot shows the manager after the registered manager logs in to his/her
account.
21
Figure 12: Customer Management
22
Figure 14: Customer Home
The above screenshot shows the manger form where the manager can manage and view
the product. Also he/she can manage the stock.
23
Conclusion
The internet has become a major resource in modern business, thus the online shopping
has gained a lot of significance. The main concept of this system is to allow the customer
to shop virtually using the internet and allow customer to buy items and goods of their
desire from the store. The Online Shopping Management System can be used for
shopping online. This system made shopping easier as it saves time and is very reliable.
Therefore this system can be used by various customers and the system is more reliable,
secure and convenient.
24
References
Balagurusamy, E. (2007). Programming With Java. New Delhi: Tata McGraw Hill .
Booch, G. (2001). Object Oriented Analysis & Design (2nd ed.). New Delhi: Addison
Wesley Longman.
Horstmann, C. (2010). Big Java (3rd ed.). New Delhi: Wiley India Pvt Ltd.
Metsker, S. J. (2006). Design Patterns in Java. New Delhi: Pearson Education Pvt Ltd.
Savitch, W. (2012). Java (An introduction to problem solving and programming. New
Delhi: Pearson Education Pvt Ltd.
25
26