You are on page 1of 7

Algorithms and Data Types

In this assignment, I am going to create a Library using java, the system will comprise of a way of
reminding people that they borrowed certain books and they are due in 14 days.]

Q.1 Create a (SLL) data type to store reminders.

i) At the beginning of the list.

ii)After a given reminder node.

Write a java application to test your algorithm

The Reminder class may implement the following interface type:

Public interface ReminderItem {

Public void setDescprition (String value);

Public String getDescpription ();

Public int getId ();

Public void setId ();

Public Date get Reminder Date ();

Public void setReminderDate (Date);

Header First Node Second Node

Link list is how items can be stored in a sequence if connected through a header and nodes.
SLL (Singly-Linked List

Creating SLL, beginning with an empty node constructor, this can allow me to insert, print and delete
any giving elements of the projects.

Java implementation

New node creation

New insert node,presdecessor to the node.

Testing Application

As part of the Information System for the Library, it is required to send reminders for books not returned
when time is due. Write an Array based queue for storing reminders. Write a Java application to test the

For this part of the project I am required to use the query concepts for the reminders so that the
reminder would flow one other each other.


Queue Array would work constructed on the beginning for each element which can only added to the
back of the queue.

Testing the Application


Explain how a Binary Search Tree may be used as a part of an Information System for the Library. As part
of your answer, illustrate how such a tree may be populated.

Binary Search Tree {BST}

Binary Search Tree is a link which comprises a header and other elements which are linked through a
root node which lead to nodes.

BST populated.
Java Application Test

Explanation of the codes>

Creation of BST with the Private Root setting and only accessed within the class.
BST Node search

BST Node contains two parameters comparable and the expected aim,To begain the
eelement;the array will set a element roots position,so it can contiune with the statement to
find the required element by the checking the correct element.

Insert BST
This aslo comprise of the parameters comparable for the the target being searched for,form the sart of
the element in the array and BST equal null parent.The new element is inserted as a new node while
checking the current BST link tree if it is empty, if any element is available this will make it decide
wheather to go left or right of the node within the node.

The Algorithm set the direction beign compared to the current element

Bst node Class

Shows the class,which will enable the delation of the Left most and Get most within the BST class.