Java Assignment Individual

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 32

GROUP ASSIGNMENT  

TECHNOLOGY PARK MALAYSIA

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:

1 Submit your assignment at the administrative counter

2 Students are advised to underpin their answers with the use of References (cited
using the Harvard Name System of Referencing)

3 Late submission will be awarded zero (0) unless Extenuating


Circumstances (EC) are upheld

4 Cases of plagiarism will be penalized

5 The assignment should be bound in an appropriate style (comb bound or


stapled).

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.

7 You must obtain 50% overall to pass this module.


INDIVIDUAL ASSIGNMENT
CT038-3-2 OODJ
OBJECT ORIENTED DEVELOPMENT WITH JAVA
Submitted By:
Niroj Thapa (NP000199)

Submitted To:

Mr. Aryan Sigdel


Acknowledgement
This project report is prepared for the fulfillment of the requirement for the degree of
BSc.IT in accordance to the rules and regulations prescribed by the Asia Pacific
University (APU). We would like to express our deepest gratitude to our college Lord
Buddha Education Foundation (LBEF) and our university which provided this
opportunity to learn several things and where we got chance to explore our creativity
through work.

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.................................................................................................................

1. Introduction (Online Shopping Management System)....................................................1

1.2 Existing System Overview........................................................................................1

2. Problem Statement...........................................................................................................2

2.1 Objective....................................................................................................................2

2.2 Scope..........................................................................................................................2

3. Research Methodology....................................................................................................3

3.1 Feasibility Analysis...................................................................................................3

3.2 Software Development Methodology........................................................................3

3.3 Functional and non-functional requirement specification.........................................4

3.4 Data Collection..........................................................................................................5

4. Software Development....................................................................................................5

4.1 Use Case Diagram.....................................................................................................5

5. Activity Diagram.............................................................................................................6

5.1 Activity Diagram: Admin..........................................................................................7

5.2 Activity Diagram Manager........................................................................................7

5.3 Activity Diagram Customer.......................................................................................8

6. Class Diagram................................................................................................................10

7. Hardware and Software Requirement............................................................................11

8. Backup and Recovery....................................................................................................12

9. Testing Strategies...........................................................................................................13

10. Implementation of Codes.............................................................................................14

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.

1.2 Existing System Overview


The current system for shopping is to visit the shop and buy the available product. The
existing online shopping system is simple but unsafe. The current system is not safe
which makes the online transaction unsafe. Some of the problems faced by existing
system are as follows:

 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:

 Secure registration and profile management facilities for the customers.


 It reduces the shopping time for customers.
 To view the details of the product without going to market.
 The customer can add or delete the product from the cart before buying the
product.
 Updates to customers about the items in the shop.

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.1 Feasibility Analysis


Feasibility analysis is the measure of how beneficial or practical the development of an
information system will be to an organization. Feasibility analysis is the process by which
feasibility is measured. Feasibility should be measured throughout the life cycle. In other
words it is the process of determining whether the project has reasonable chance of
success. The project will be successful when there is no tight boundary of time and cost.
With the help of feasibility study the task of manager becomes easy so that they deal the
success of project efficiently.

3.2 Software Development Methodology


The software methodology is a framework that is used to plan and design the information
system. The online management system is written in Java and net-beans are used as an
IDE java tool for this system.

3
Figure 1: Software Development Method

3.3 Functional and non-functional requirement specification


System requirement gathering specify what the information system must do or what
quality/ property the proposed system must have. There are namely two types of system
requirement gathering and they are as follows:

1. Functional Requirement Gathering


The system requirements that specify what the information system must do are
frequently referred to as functional requirement gathering.

 The system must be computerized rather than manual


 All the data must be stored in database
 The data retrieval must be obtained from database
 The unique code number of the patient should be auto generated
2. Non-Functional Requirement Gathering
The system requirements that specify a property or quality the system must have are
referred to as non-functional requirement gathering.

 The system should be real time


 The data storing and retrieval should be fast and reliable

4
 The database should handle numerous data at the same time

3.4 Data Collection


The process of collecting data through survey, interview or any means is called data
collection. The data collection is important to ensure the integrity of the research. The
main problem while collecting data are misleading questionnaires, unknowingly omitting
the collected data, unintentional errors.

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.

4.1 Use Case Diagram


The use case diagram is a behavior diagram in UML. The use cases diagrams are
designed using actors and use cases. The use case diagram for the online shopping
management system is given below:[CITATION htt18 \l 1033 ]

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 ]

5.1 Activity Diagram: Admin

Figure 3: Activity Diagram (Admin)

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

Figure 4: 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.

5.3 Activity Diagram Customer

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.

Figure 6: Class Diagram

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

Processor: Intel Core i7

Hard Disk: 1 TB

RAM: 8 GB

Software Requirement

Operating System: Windows 10

11
User Interface: HTML, CSS

Programming Language: Java

Client-side Scripting: JavaScript

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:

Non-functional testing is used to check non-functional features of the systems that


include performance, usability, reliability etc. of the application. The non-functional
testing includes all the parameters that are not addressed by the functional testing criteria.
The non-functional testing methods are done through the following methods:

 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. Implementation of Codes


During the coding process different classes, objects, abstraction, encapsulation,
constructor are used. These object oriented parts of the programming language helps in
the construction of the online shopping management system.

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:

 Compile time polymorphism


 Run-time polymorphism

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:

Admin Manager Customer


Username: niraj Username: manager Username: customer
Password: niraj Password: manager Password: customer

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

Figure 13: Cart

22
Figure 14: Customer Home

Figure 15: Manager Form

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.

https://www.smartdraw.com. (2019). https://www.smartdraw.com. Retrieved 06 01,


2019, from Smart Draw: https://www.smartdraw.com/use-case-diagram/

Metsker, S. J. (2006). Design Patterns in Java. New Delhi: Pearson Education Pvt Ltd.

Pender, T. (2008). UML 2. New Delhi: Wiley India Pvt Ltd.

Point, T. (n.d.). Tutorilas Point. Retrieved 05 25, 2019, from


https://www.tutorialspoint.com:
https://www.tutorialspoint.com/uml/uml_activity_diagram.htm

Savitch, W. (2012). Java (An introduction to problem solving and programming. New
Delhi: Pearson Education Pvt Ltd.

25
26

You might also like