You are on page 1of 20

Page 1

Unit 41-Programming in Java

Assignment Title : Read with us – Library Management System

Assignment no : (Java -16-001)

By

Vagish Kirubaharan

COL/A-051935

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 2

Task 1

The Principles and Programming in Java

1. Java is simple
The main features of Java in comparing with other programming languages, it is very simple
and easy to learn. Java is the object oriented programming language. As well as Java provides
the error free development environment for a programmer because it provides automatic
memory management by development environment and it eliminates pointers.

2. Java is Platform Independent


When it comes to features of java , A specific feature known as platform independence , it
means the executable file which programed by java can be run any platform without problem.
The main reason for these features is Java virtual machine

3. Java is Object-oriented
If a programming language wants to be an object oriented that language must support
characteristics of the OOPs, there for java is object oriented language. In the Java everything
is treated as objects to which methods are applied. java is a fully Object Oriented language
because object is at the outer most level of data structure in java. No standalone methods,
constants, and variables are there in java. Everything in java is object even the primitive data
types can also be converted into object by using the wrapper class.

4. Java is Distributed
It is widely used for file transfer protocols that HTTPS and FTP are developed in java.
Therefor Internet programmers can call functions on these protocols and can get access the
files from any remote machine on the internet rather than writing codes on their local system.

5. Java is Secure
Another attractive feature of java language is, it is secure than other language. Why say java
is secure, because java does not use local memory. The program which corded by java run
under an area known as the sand box. Security manager determines the accessibility options
of a class like reading and writing a file to the local disk. As well as the byte code verifier
checks the classes after loading.

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 3

 No memory pointers
 Programs runs inside the virtual machine sandbox.
 Array index limit checking

6. Java is compiled and interpreted


As we know Java code is compiled to bytecodes that are interpreted by Java virtual machines.
This offers portability to any machine for which a virtual machine has been written. The
interpreter program reads the source code and translates it on the fly into computations.

7. Java is Robust
Robust means strong. Why say like that, java uses strong memory management, as well as
there are lack of pointers that avoids security problem, and java has their own automatic
garbage collection. As well as java has exception handling and type checking mechanism.

8. Java is Portable
The “write once run anywhere” concept gives the portability for java programming. We may
carry the java bytecode to any platform without any problem.

1.2

Java Virtual Machine (JVM) is an abstract machine which provides runtime environment for
the java bytecode. In other words, JVM acts as a layer between java application and the
underlying platform. As display name, JVM is a virtual machine or processor which
communicating with the physical machine. However, they are interacting with each other.

However, the attractive thing is JVM provides the ability to execute the application by
ignoring what is the platform, that means JVM provides platform independence ability for the
application. It considers as “write once, run anywhere” concept. Actually, the JVM is a part
of Java Runtime Environment (JRE). JVM which run the bytecodes calls classes that in JRE
when it needs to perform some actions, as well as JVM manipulates the underlying hardware

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 4

or the operating system to perform some actions. The byte codes want to minimize their
functionality and JVM has to do many tasks for them. The portability of java programs are
depend on the JVM and the communication between an application and underlying platform
are very sophisticated.

Internal Architecture of JVM

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 5

Task 3

Sequence:
Statements are executed in a specified order. Not a statement is skipped and no statement is
executed more than once.

Coding sample

Selection:
It selects a statement to execute on the basis of the condition. Statement is only executed
when the condition is true and ignored when it is false e.g. if, if else, switch structures.

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 6

According to the cord, “if” condition will be true only on the formula “diffInDays” (this a
variable in the cord) more than 14, then the if condition will be executed, otherwise it will
not be executed.

Repetition
In this structure the statements are executed more than one time. It is also known as iteration
or loop e.g. while loop, for loop do-while loops etc.

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 7

I used “while loop” to read the result of the query. This “while loop” continuously run until
the result of “rs” variable is end.

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 8

For Example

3:4
//what is java error handling

//what are the methods of error handling

//what are the method which I used

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 9

//advantages of it

3:5

The Integrated Development


An integrated development environment (IDE) which means,the software suite that helps to
developers to write and test the software. By the IDE consolidates the basic tools as
developers who can be easy to design the software. Typically, an IDE encloses a code editor,
a compiler or interpreter and a debugger, as the developer can accesses through a single
graphical user interface (GUI). An IDE may be a standalone application, or it may be
included as part of one or more existing and compatible applications.

I used “Java NetBeans” as my IDE. NetBeans is a free software that provides by “Oracal”
company for the java developers. When we talk about NetBeans, we have to say first that it is
a user-friendly software, why I say like that, first of all about NetBeans interface, it has been
created as doing cording is easy. NetBeans interface has three tab such as, “Source”,
“Design” and “History”

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 10

Now let’s see, the facilities by providing NetBeans when we create a software. First, should
be mentioned about the “palette”, which provides us the necessary logos and the important
tools which we want to create a software. By using these tools, we can create attractive
interfaces, only we want to do drag and drop which we want tool into the interface.

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 11

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 12

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 13

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 14

Task 4

4:1

Module no 1

Check “Register” form.

1.1- Register new member with all field correctly fill


Test data - Username = “user”, Password = 1234, ID = mem_9, Position = Member

Expected Result - Display success message and save field data into the “tbl_users”
table.

Actual Result - Expected result happens correctly.

Status - True

1.2- insert data with empty field


Test data - Username = “madura”, ID = mem_10

Expected Result - Should be displayed a message call that “Please fill all fields
correctly”.

Actual Result - Expected result happens correctly.

Status - True

1.3- Register member again who already registered.


Test data - Username = “user”, Password = 1234, ID = mem_9, Position = Member

Expected Result - Should be displayed message called “You have already registered”

Actual Result - Expected result happens correctly.

Status - True

1.4- check whether can be registered member as librarian.


Test data - Username = “user”, Password = 1234, ID = mem_9, Position = Librarian
Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 15

Expected Result - Should be displayed message called “Please, Enter valid member Id
of you”

Actual Result - Expected result happens correctly.

Status - True

1.5- when click on “sign in” link


Expected Result - “Login” page should be displayed.

Actual Result - Expected result happens correctly.

Status - True

1.6- Register new librarian with all fields.


Test data - Username = “librarian”, Password = 4567, ID = lib_2, Position = Librarian

Expected Result - Display success message and save field data into the “tbl_users”
table.

Actual Result - Expected result happens correctly.

Status - True

Module 2

2 :1
Test data - Username = “user”, Password = 1234

Expected Result - Should be displayed “MemberFunctions.java” page directly.

Actual Result - Expected result happens correctly.

Status - True

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 16

2.2- Login with incorrect username and password


Test data - Username = “Sumeda”, ID = mem_101

Expected Result - Should be displayed a message call that “Invalid Username or


Password”.

Actual Result - Expected result happens correctly.

Status - True

1.3- Login with one field correct and other field incorrect
Test data - Username = “Sumeda”, ID = mem_10

Expected Result - Should be displayed a message call that “Invalid Username or


Password”.

Actual Result - Expected result happens correctly.

Status - True

1.4- check whether according to the login person the main menu is change.
Test data - Username = “librarian”, Password = 4567

Expected Result - Should be displayed “LibrarianFunctions.java” page directly.

Actual Result - Expected result happens correctly.

Status - True

Test data - Username = “user”, Password = 1234

Expected Result - Should be displayed “MemberFunctions.java” page directly.

Actual Result - Expected result happens correctly.

Status - True

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 17

1.5- when click on “Register” link


Expected Result - Should be displayed “Register” page.

Actual Result - Expected result happens correctly.

Status - True

• Module No: 03

Check “Add book” page.

3.1- Check whether “Book Id” auto display when page start
Expected Result - Next “Book Id” auto assign to the “Book ID” field when page start.

Actual Result - Expected result happens correctly.

Status - True

3.2- Add book with all fields


Test data - Book ID = “”, Book Name = “”, ISBN Number = “”, Author Name = “”,
Number of Books = “”, Category = “”

Expected Result - Should be displayed a message call that “One Book


Successfully Inserted” and save that data into “tbl_book” table.

Actual Result - Expected result happens correctly.

Status - True

3.3- Add book with some fields empty


Test data - Book ID = “”, Book Name = “”, Author Name = “”, Category = “”

Expected Result - Should be displayed a message call that “Please, fill all fields
correctly”.

Actual Result - Expected result happens correctly.

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 18

Status - True

• Module No: 04

Check “Add Member” page.


4.1- Check whether “Member ID” auto display when page start

Expected Result - Next “Member Id” auto assign to the “Member ID” field when page
start.

Actual Result - Expected result happens correctly.

Status - True

4.2- Add member with all fields


Test data - Member ID = “”, First Name= “”, Last Name = “”, Address = “”, Contact
Number = “”.

Expected Result - Should be displayed a message call that “One member


successfully registered” and save that data into “tbl_member” table.

Actual Result - Expected result happens correctly.

Status - True

4.3- Add book with some fields empty


Test data - Member ID = “”, Last Name = “”, Contact Number = “”.

Expected Result - Should be displayed a message call that “Please, fill all fields
correctly”.

Actual Result - Expected result happens correctly.

Status - True

• Module No: 05
Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 19

Check “Search Books” page.

5.1- Search book by “book Id”


Test data - Search by Book ID or Book Name = book_1

Expected Result - All fields will fill according to the book of “book_1” details

Actual Result - Expected result happens correctly.

Status - True

5.2- Search book by “book Name”


Test data - Search by Book ID or Book Name = sulaga

Expected Result - All fields will fill according to the book of “sulaga” details.

Actual Result - Expected result happens correctly.

Status - True

5.3- Check “reserve” button


Test data - When click on “Reserve” button.

Expected Result - The book which is on display can be able to reserved by


member, and should be displayed a message called “Reserved Successfully”.

Actual Result - Expected result happens correctly.

Status - True

Test ID Description Test Data Expected Result Status


1.1 Insert all field Username = Display message True
correctly “mdura” and save that
Password = 123 data into
“tbl_users” table

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)
Page 20

“tbl_users”
table
1.2 Incorrect User name = Display Go to the Fail
user name “Admin” “incorrect main menu
and correct Password = user name or
password 1234 password ”

4:3
1 : How are you satisfied with this system

2: Is the system easy to use?

3: Is this system easy to install in your device or server?

4: How do you recommend this software to others?

FUTURE RECOMMENDATION

• We can add more secure encryption passwords for this system

• It is better if we use database for storing student details

• Further we can add online exam part for our system and Graphical user interface

• We can improve our user manual to the users to use this system more easily

Vagish Kirubaharan
Read with Us – Programming in Java
(JAVA -16-001)

You might also like