Search for notes by fellow students, in your own course and all over the country.

Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.

My Basket

You have nothing in your shopping cart yet.

Title: data structures and algorithms
Description: data structures and algorithms HND Higher national diploma

Document Preview

Extracts from the notes are below, to see the PDF you'll receive please use the links above


Data Structure and
Algorithm
Implementation of an Employee Management System

A PROJECT SUBMITTED TO
INTERNATIONAL COLLEGE OF BUSINESS AND TECHNOLOGY (ICBT)
IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
FOR THE
HND IN COMPUTER STUDIES

HND computing and system development
HND in software development

DSA

Batch 53

Table of Contents
Introduction
...
6
Executive Summary
...
8
1
...
8
1
...
1 Stack
...
1
...
9

1
...
2
...
9
1
...
2
...
9
1
...
2
...
9
1
...
2
...
9
1
...
2
...
9
1
...
2 Queue
...
1
...
1 Operations of Queue
...
1
...
2 POP
...
1
...
3 Push
...
1
...
4 Peak
...
1
...
5 IsFull
...
1
...
6 IsEmpty
...
1
...
10

1
...
3
...
11
1
...
4 The operations in a linked list include insert, delete and find
...
1
...
1 Insert
...
1
...
2 Delete
...
1
...
3 Find
...
12

2
...
12
2
...
1 Advantages and Disadvantages of Arrays
...
1
...
12
2
...
3 Advantages and Disadvantages of Queue
...
1
...
13
2
...
13
TASK 03
...
1 Binary search
...
1
...
15
3
...
2 Why I Prefer Binary over Linear for the proposed system
...
2 Select most suitable sorting algorithms and justify the selection based on Performance of
algorithms
...
2
...
16
3
...
2 Selection Sort
...
2
...
16
Task 04
...
1 Input Validation and error handing
...
17
Task 05
...
19
Task 06
...
20
6
...
20
6
...
21
6
...
22
6
...
24
6
...
24
Task 7
...
1 String operations used in the application
...
27
8
...
27
8
...
1 Unit testing
...
1
...
27
8
...
3 Incremental Integrating testing
...
1
...
27
8
...
5 Regression testing
...
1
...
27
8
...
7 Black box testing
...
1
...
27
8
...
9 Functional testing
...
2 White box testing
...
2
...
28
8
...
2 Disadvantages of White Box testing
...
3 Black box testing
...
3
...
29
8
...
2 Disadvantage of Black Box testing
...
4 Test case and Test Plan
...
5 Test Plan
...
7 Test case 01
...
8 Test case 02
...
9 Test case 03
...
9 Test case 04
...
10 Test case 05
...
11 Test case 06
...
34
Conclusion
...
36
Gantt chart
...
According to the scenario the ICBT management
is hoping to build a suitable windows base office administration for the University
...

The security is the most important aspect while we design a system
...
All the
functionalities and designing styles are discussed briefly in the several tasks
...

Recursive algorithms and Linked List are choose for system is well explained and clearly
justified
...


By Safaru Laahi Bushree, Student ID: HND/C/53/41

5

DSA

Batch 53

ACKNOWLEDGMENT
This project was indeed a lot of hard work and time
...
Firstly, I would like to thank our
lecturer Mr
...
He was indeed very patient while guiding us
...
I truly
appreciate her dedication from the bottom of my heart
...

Finally I owe my special appreciation to “my parents” for giving me both spiritual and moral
support
...


By Safaru Laahi Bushree, Student ID: HND/C/53/41

6

DSA

Batch 53

Executive Summary
ICBT is leading University in Sri Lanka
...

At first I have focused on the functionality of the application which is going to implemented
...
Hence, I have attended
the some of the security concerns and justify how to improve the security
...

The Application is developed according to their future expectation of benefit
...
Finally the developed system is tested according to a test plan successfully
implemented
...
1 data structures
Data structure is a method to sorting and organize data in a computer so that they can be used
effectively
...

Data structures are a solution to manage large amounts of data
...
Some recognized design methods
and programming languages are the data structures, relatively than algorithms the
dominant organization account of software design
...


1
...
1 Stack
Stacks are data structures which maintain the order of last-in, first-out
...
And
we can assume in a construction companies most of the times newly recruited employee
would leave their job
...


Fig 1
...
1
...
1
...
1 POP

It removes the last element from the stack
...

1
...
2
...


1
...
2
...


1
...
2
...


1
...
2
...


1
...
2 Queue
One of the possible data structures that can be used in the above scenario can be QUEUE
...
Logically Grades are provided by
University by analysing students’ academic performance in the subject
...


Fig 1
...
1
...
1 Operations of Queue
1
...
2
...

1
...
2
...
Therefore management can use
this method to enrol the students
...
1
...
4 Peak

It is used to check which element is in the front
...

1
...
2
...
Therefore if the maximum number of students has
been already taken in the particular batch, this method would return true letting the
management knows that the queue is full
...
1
...
6 IsEmpty

It is used to check whether the queue is empty
...


1
...
3 Linked Lists
Linked Lists are simple data structures but a little advanced than the other structures
available
...
A Linked List is a collection of record of the same type
of data, and these documents are linked by pointers, each record in a linked list has a field
pointer to the next record in the list
...
A variable pointer is used to point to the first record in the list
...
2 representation of Link lists

By Safaru Laahi Bushree, Student ID: HND/C/53/41

10

DSA

Batch 53

The key benefit of using the linked list over an array is that the element insertion is very easy
and also removal and organizing is more efficient and convenient
...
A simple linked list also allows efficiency in indexing and offers
many operations like retrieving, inserting and removing
...
1
...
1 The linked lists are found to be implemented in:

 Internet browsers which keeps track of the visited websites
...
The back button when clicked views the last
browsed page and it goes on like that
...
This functionality enables the reversal of the last action
...

 The linked list is also implemented in most computer games where complex data
structures are normally implemented
...


1
...
4 The operations in a linked list include insert, delete and find
1
...
4
...

1
...
4
...

This goes on until a search result is found on the item to be deleted
...

1
...
4
...


By Safaru Laahi Bushree, Student ID: HND/C/53/41

11

DSA

Batch 53

TASK 02
Identify the most suitable data structure for the given scenario and implement the solution for
maintain the student information
...
1 Comparison of Data Structures to select one for the given situation

Data structures are ways to organize data
...


2
...
1 Advantages and Disadvantages of Arrays

Advantages
 Little to no risk of overflow or
underflow errors – as it will always take
up the same space in memory
...
This can result
in:
 Waste of resources – once they have
 This will most likely be reserved so no
been reserved the space it can no longer
other program can access it
...

 The program/memory management
 Running out of space when the
system can allocate a fixed amount
prediction of space is too little
...

 Inefficient use of memory
...
1 Advantages and disadvantage of arrays

2
...
2 Advantages and Disadvantages of stack

Advantages
 Low Hardware Requirement
 Cross- Platform
 Anyone with access can edit the
program

disadvantages
 Inflexible
 Lack of scalability

Fig 2
...
1
...


disadvantages
 It is not readily searchable
 Adding or removing elements from
the middle of the queue is very
complex
...
3 Advantages and disadvantage Queue
By Safaru Laahi Bushree, Student ID: HND/C/53/41

12

DSA

Batch 53

2
...
4 Advantages and Disadvantages of Link list

Advantages

disadvantages

 Data can add dynamically, so it
can extend as far as physically
possible, it means more flexible
...

 Inserting, merging and deleting of
items are very easy and requires
little processing power
...

 Good memory Management

 Unnecessary + inefficient for small
amounts of data
...

 Data can be highly fragmented over
extended use
...


Fig 2
...
2 Why Link List is selected?
According to the given scenario linked list (Details are mentioned in task 1) is the
most suitable data structure to implementation the solution for maintains the student
information
...

 Information (Data) can be stored in more organized and efficient way
...


The linked list is a very efficient data structure as it does not have a size constraint unlike
arrays and unlike stack and Queues; it is makes insertion of data more flexible
...
The linked list contains
series of nodes each node has a data component and points to a cursor after the node
...


By Safaru Laahi Bushree, Student ID: HND/C/53/41

13

DSA

Batch 53

TASK 03
As I mentioned in the above in general, to find a value in the unsorted array, we should look
through the elements of an array one by one, until the craving is found
...
On average, the complexity of such
an algorithm is algorithm is proportional to the length of the array
...
1 Binary search
Binary search is popular search algorithm for large list of elements
...
Then it
will take the index which is located in the middle, if it does not match it will either the index
which is in the right or left
...
If there is a match, we can return immediately
...


Fig 3
...


By Safaru Laahi Bushree, Student ID: HND/C/53/41

14

DSA

Batch 53

Here It’s successfully display 50 is in 5th position

3
...
1 Linear Search
In here we will find an element from an array using linear search
...
The array can be in any order, it checks whether a component numbers,
strings, etc
...
Basically, it is for the small array
...
If the element is found, we can return to
the index of the elements in the array
...
In computer science, sequential
search is a method for finding a particular value in a list that consists of checking every one of its
elements, one at a time and in sequence, until the desired one is found
...
1
...
In linear method

By Safaru Laahi Bushree, Student ID: HND/C/53/41

15

DSA

Batch 53

3
...
Sorting is a most
important operation done by computers
...

3
...
1 Bubble sorting algorithm

It is a simple sort algorithm repeatedly running through the list ordered by Comparing each
pair of adjacent elements and exchange of Them When They’re in the correct order
...
The algorithm takes
its name from the many more small “bubble “at the top of the list elements
...
Although the
algorithm is simple, you other algorithms for classification of large lists more efficiently
...
Algorithms are significantly better or significantly worse
average difficulty classifying O (n log n)
3
...
2 Selection Sort
This selection sort is works by repeatedly element
...


3
...
3 Selection sorting algorithms
To develop this system is well suited for this kind of choice is? Chance of work made a list of
items
...
The main advantage of choosing the type of work that is a short list
...
Selection according to N - square
number of stages of sorting n elements
...
Because of this, this type of
selection is only some of the elements of the list are in random order

By Safaru Laahi Bushree, Student ID: HND/C/53/41

16

DSA

Batch 53

Task 04
4
...
In this section explain about different error handling
messages and some validation shown by the GUI application
...
1 register button is begin clicked
From above screen capture if user input data and click on add button the specific data will be
save to the database displaying message Saved
...


Fig 4
...
In another scenario if user didn’t enter any relevant information during the
process of these steps, another type of error message will appear, informing that missing text
is in the screen as shown in below
...
3 Student ID field is missing text

By Safaru Laahi Bushree, Student ID: HND/C/53/41

18

DSA

Batch 53

Task 05
Recursively defined algorithms are a central part of any advanced programming course and occur in
almost every aspect of computer science
...
The greatest advantage of this algorithm is it reduces the time and amount code to
be written
...

Recursive Algorithms on Linked Lists
The recursive algorithms depend on a series of method calls to chain along the list, rather than an
explicit for loop
...

According to my system here I used this

Fig 5
...




A recursive call which passes the simpler problem back into the method
...




Recursion one can solve problems in easy way while its operative clarification is very big and
composite
...
In many places programmer should face String operations such as toUpperCase();
toLowerCase(); trim(); CharAt(); and length(); etc
...


6
...
For instance, name field is set to get
user input and even if the user types the name in lower case it will be converted to UPPER
CASE by toUpperCase() function and displayed the output
...
1 Upper Case String
As shown in the above coding, “fname” variable is having a String of characters written in
lower case
...
So toUpperCase() function is used to achieved this as shown
...
2 Upper Case String Output
By Safaru Laahi Bushree, Student ID: HND/C/53/41

20

DSA

Batch 53

6
...
In the places
where only lowercase characters are accepting, this function can be very useful in
those situations
...


Fig 6
...
To
achieve the expected output Programmer can use toLowerCase function as shown in figure
...
4 Lower Case String output

By Safaru Laahi Bushree, Student ID: HND/C/53/41

21

DSA

Batch 53

6
...
This method removes the blank spaces from both ends of the given string (Front
and End)
...
For
example in a place where user has to enter employee number to search on particular
employee, and mistakenly user has given spaces in the beginning of the employee id
...


Fig 6
...
So inside the program, a
condition is making based on the user entered value
...
6 Trim String output

By Safaru Laahi Bushree, Student ID: HND/C/53/41

22

DSA

Batch 53

Even if there were many spaces in the beginning of the employee id, program
executed successfully and has given the expected output
...


Fig 6
...
And
the same input has been used here as well therefore let’s see what program output
...
8 Output of Trim String Disabled (commented)

Although the program executed without an error and has given the expected output
...
That means that the program has identified the unnecessary
spaces as characters as well and left unsatisfying the if conditions
...
4 CharAt()
This method returns the character located at the String's specified index
...
According to the parameters we are going to pass, Index of the character to
be returned
...
9 CharAt String
As shown in the above coding, fname variable is having a String of characters
...
This method Returns
a char at the specified index
...


Fig 6
...
5 Length()
This method returns the length of the string
...


Fig 6
...

This method is to find directly the length of the object
...
So this will achieved result as
shown
...
12 Length String output

By Safaru Laahi Bushree, Student ID: HND/C/53/41

25

DSA

Batch 53

Task 7
7
...


Fig 7
...
And the student name
also should be in UPPERCASE
...
2 String Operation
Let’s assume that the user has mistakenly entered student id in lowercase and giving
unnecessary spaces at the beginning of the student id
...
But the user has mistakenly entered the
student name in lowercase
...


Fig 7
...


By Safaru Laahi Bushree, Student ID: HND/C/53/41

26

DSA

Batch 53

Task 08
8
...
It involves the operation of a system
or application under control conditions and evaluating the results
...

8
...
1 Unit testing
This is the testing at the simplest level to test particular functions done by the programmer
...
1
...
The goal is to see if the modules can be integrated properly
...
1
...
It includes top down and bottom up testing
...
1
...

8
...
5 Regression testing
It perform when some alteration are may include the existing system, all portions of the
program effected by the modification must be retested
...
1
...
In this customers
will use the system for a limited time period
...
And test log is prepared
after testing
...
1
...
In this the tester only knows the inputs and what the expected output
...
1
...

By this we can check the actual codes and things
...
1
...
For this program I have
choose White box and Black box testing, because it has a specific Advantages than other
testing methods did not perform
...
2 White box testing
White box testing perform base on the knowledge of how the system implement
...
It can require access to the source code and white
box can be performed anytime, after the code developed in the lifecycle
...
2
...

 Testing can be started at the very primary stage
...

 Can decrease to number of test cases to be executed through black box testing
...

 Extra code resulting in hidden defects can be removed
...

 Identifying test data is easy because coding knowledge will be a pre-requisite
...
2
...

Cost of tester is very high
...

It is not possible to look into each piece of code to find out hidden errors
...

Since White Box Testing it closely tied with the application being testing, tools to cater to
every kind of implementation/platform may not be readily available
...


By Safaru Laahi Bushree, Student ID: HND/C/53/41

28

DSA

Batch 53

8
...
It is also termed data
input/output or requirements based testing
...

8
...
1 Advantage of Black Box testing
 Ease of use: Since testers are not required to have knowledge about the internal coding, it is
easier for testers to test the application and create test cases
...

 Simplicity: For testing of large and complex systems black box testing simplifies the testing
by having a concept of valid and invalid inputs and checking for correct outputs
...

 Black box tests are reproducible
...

 Expose ambiguities and complexities in application
...


8
...
2 Disadvantage of Black Box testing








Reason for failure cannot be known
...

Maintaining test cases is difficult if the requirements are constantly changing
...

Without clear specification test cases cannot be prepared
...

Quality of coding and adherence to coding standards will be unknown
...
4 Test case and Test Plan
A test case is a set of conditions or variables and inputs that are developed for a particular
goal or objective to be achieved on a certain application to judge its capabilities or features
...
There are 2 types of test cases;


Positive test case,



Negative test case
...
Negative test case: Negative
test cases as the name suggests are destructive test cases which are recognized with
some out-of-box thinking to break the system
...
5 Test Plan

Test Plan ID

Test Case Name

Action/Steps

Expected Results

Test Case 1

student ID text box

Inserting no values to

An error message should be

student id

pop up
...
Like “Fill Employee
Name”

Course name

Inserting no values to

An error message should be

Course name

Test Case 3

pop up
...
Like “Fill Date of
exam”

Subject name

Inserting no values to

An error message should be

Subject name

Test Case 5

pop up
...
Like “Fill Working
Project No”

By Safaru Laahi Bushree, Student ID: HND/C/53/41

30

DSA

Batch 53

8
...
Like “Enter the Student ID”
Else no error message

Actual Outcome

When Student ID text box is empty
An error message should be pop up
...


8
...
Like “Enter the Student
Name” Else no error message

Actual Outcome

When Student Name text box is empty
An error message should be pop up
...


By Safaru Laahi Bushree, Student ID: HND/C/53/41

31

DSA

Batch 53

8
...
Like “Enter the Course
Name” Else no error message

Actual Outcome

When Course Name text box is empty
An error message should be pop up
...


8
...
Like “Enter the Course
Name” Else no error message

Actual Outcome

When Date of exam text box is empty
An error message should be pop up
...


By Safaru Laahi Bushree, Student ID: HND/C/53/41

32

DSA

Batch 53

8
...
Like “Enter the Subject
Name” Else no error message

Actual Outcome

When Subject Name text box is empty
An error message should be pop up
...


8
...
Like “Enter the Result of
exam” Else no error message

Actual Outcome

When Result of exam text box is empty
An error message should be pop up
...


By Safaru Laahi Bushree, Student ID: HND/C/53/41

33

DSA

Batch 53

Future Recommendation
As future enhancement I can recommend to develop the database connectivity which is not
available currently
...
Also we can use attractive interfaces and can be
implemented HCI based colours to make the appearance joyfully for the user
...
In
future there might be high demand for this organization from the attractive customers
...


 The design of the application should be more improved
...


 For the security purpose use original version of software’s and makes the
hardware requirements are performing well
...
This is when the
studentsare given or assigned particular branch and they receive emails on details
regarding that branch witch they assign
...
The
main goal of the visualization is, it centralize the administrative tasks and also
improving the scalability of resource utilization of overall hardware
...
This becomes a benefit to manage the network in
future
...
In
future the organization can implement RAID (Redundant Array of Independent
Drives) for the more safety and for more performance
...
It is mostly
recommended the RAID 10 as the best
...
I was requested as a developer to build this windows based
solution by developing an application to the organization
...

At the beginning I gathered some information about the organizational structure and who are
the people assign to complete different tasks in the organization
...
By
doing this certain module I enough knowledge about all the data structures and algorithms
...
By completing this
specific module I got better knowledge about above given criteria and some more too
...
The system functions are discussed with
including some relevant screen captures
...
After implementing the system I
have conducted a test plan according to the test plan all the test cases were included
...
To conclude it pleasure to say that the developed windows base system would be
meet the requirements of the ICBT and the organization can be further more successful by
using the windows application with the future recommendations
...
cs
...
ac
...
html> [accessed 2013, 04, 14]

Stack and queues operation [online] available at:
>http://pages
...
wisc
...
STACKS-AND-QUEUES
...
Algorithms and Data Structures
...
Available at:
http://www
...
net/Programming_concepts/Recursion
...
BubbleSort
...
algolist
...
[Accessed 12th November 2013]

Sitepoint (2006)
...
[Online]
...
sitepoint
...
[Accessed: 12th November 2013]

By Safaru Laahi Bushree, Student ID: HND/C/53/41

36

DSA

Batch 53

Gantt chart

By Safaru Laahi Bushree, Student ID: HND/C/53/41

37


Title: data structures and algorithms
Description: data structures and algorithms HND Higher national diploma