Data structure
data/hhh.jar
META-INF/MANIFEST.MF
Manifest-Version: 1.0
Link.class
public synchronized class Link { public String bookName; public int millionsSold; public Link next; public void Link(String, int); public void display(); public String toString(); public static void main(String[]); }
LinkList.class
synchronized class LinkList { public Link firstLink; void LinkList(); public boolean isEmpty(); public void insertFirstLink(String, int); public Link removeFirst(); public void display(); public Link find(String); public Link removeLink(String); }
.project
LinkedLists org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature
.classpath
data/JUBAIL UNIVERSITY COLLEGE.docx
JUBAIL UNIVERSITY COLLEGE
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
SEMESTER 382
GROUP ASSIGNMENT (8%)
|
Course Code |
CS 205 |
Course Title |
Data Structures |
Section |
|
|
Date Given |
26/03/2018 |
Date of Submission |
|
|
|
PART I |
TO BE FILLED BY THE STUDENT |
|
|
|
STUDENT’S NAME |
|
ID. No. |
|
|
STUDENT’S NAME |
|
ID. No. |
|
|
STUDENT’S NAME |
|
ID. No. |
|
|
|
|
|
|
TO BE FILLED BY THE CONCERNED DEPARTMENT
|
PART II |
|
|
1st Marker |
|
Area of Assessment |
Max Marks |
Actual Marks |
Comments/Remarks |
|
Project Documentation |
10 |
|
|
|
System Functionality |
18 |
|
|
|
Presentation |
4 |
|
|
|
Total |
32 |
|
|
|
|
|
Name: |
|
|
|
|
Signature |
: |
Introduction
PROJECT DESCRIPTION
The students need to form groups consisting of 3 members. Each group has to develop TWO (2) Java applications by applying any suitable Data Structures (Linked List, Stack and Queue) studied in this course. The applications can be developed for handling the student list, employee list, shopping list, book list, seminar reservation, hall reservation, air-ticket reservation, hotel reservation, stock inventory, sales invoice or any other. The nodes of each data structure should include at least FOUR (4) fields/attributes appropriate to the applications. Each application should include at least FOUR (4) basic operations performed on the data structures (such as insert, update, delete, search or print). And, include at least ONE (1) new operation/method in each application. (For example, sorting the elements (in ascending/descending order) in the linked list, retrieving/modifying the set of nodes in the list that satisfies the given condition, deleting the set of nodes from the list that satisfies the given condition, adding/removing the elements as per priority in the queue, swapping the elements in the Stack etc.)
Application of Linked List.
In computer a linked list is a linear collection of data elements in which a linear order is not given by their physical placement in memory. Instead, each element points to the next.
Program listing
Main Class
public class Link {
// Set to public so getters & setters aren't needed
public String bookName;
public int booksSold;
public Link next;
public Link(String bookName, int booksSold){
this.bookName = bookName;
this.booksSold = booksSold;
}
public void display(){
System. out .println(bookName + ": " + booksSold + ",000,000 Sold");
}
public String toString(){
return bookName;
}
public static void main(String[] args) {
LinkList theLinkedList = new LinkList();
theLinkedList.insertFirstLink("Don Quixote", 500);
theLinkedList.insertFirstLink("A Tale of Two Cities", 200);
theLinkedList.insertFirstLink("The Lord of the Rings", 150);
theLinkedList.insertFirstLink("Harry Potter and the Sorcerer's Stone", 107);
theLinkedList.display();
System. out .println("Value of first in LinkedList " + theLinkedList.firstLink + "\n");
// Removes the last Link entered
theLinkedList.removeFirst();
theLinkedList.display();
System. out .println(theLinkedList.find("The Lord of the Rings").bookName + " Was Found");
theLinkedList.removeLink("A Tale of Two Cities");
System. out .println("\nA Tale of Two Cities Removed\n");
theLinkedList.display();
}
}
Linked List Class
class LinkList{
public Link firstLink;
LinkList(){
// Here to show the first Link always starts as null
firstLink = null;
}
// Returns true if LinkList is empty
public boolean isEmpty(){
return(firstLink == null);
}
public void insertFirstLink(String bookName, int booksSold){
Link newLink = new Link(bookName, booksSold);
// Connects the firstLink field to the new Link
newLink.next = firstLink;
firstLink = newLink;
}
public Link removeFirst(){
Link linkReference = firstLink;
if(!isEmpty()){
// Removes the Link from the List
firstLink = firstLink.next;
} else {
System. out .println("Empty LinkedList");
}
return linkReference;
}
public void display(){
Link theLink = firstLink;
// Start at the reference stored in firstLink and
while(theLink != null){
theLink.display();
System. out .println("Next Link: " + theLink.next);
theLink = theLink.next;
System. out .println();
}
}
public Link find(String bookName){
Link theLink = firstLink;
if(!isEmpty()){
while(theLink.bookName != bookName){
// Checks if at the end of the LinkedList
if(theLink.next == null){
// Got to the end of the Links in LinkedList
// without finding a match
return null;
} else {
// Found a matching Link in the LinkedList
theLink = theLink.next;
}
}
} else {
System. out .println("Empty LinkedList");
}
return theLink;
}
public Link removeLink(String bookName){
Link currentLink = firstLink;
Link previousLink = firstLink;
// Keep searching as long as a match isn't made
while(currentLink.bookName != bookName){
// Check if at the last Link in the LinkedList
if(currentLink.next == null){
// bookName not found so leave the method
return null;
} else {
// We checked here so let's look in the
// next Link on the list
previousLink = currentLink;
currentLink = currentLink.next;
}
}
if(currentLink == firstLink){
// If you are here that means there was a match
// in the reference stored in firstLink in the
// LinkedList so just assign next to firstLink
firstLink = firstLink.next;
} else {
// If you are here there was a match in a Link other
// than the firstLink. Assign the value of next for
// the Link you want to delete to the Link that's
// next previously pointed to the reference to remove
System. out .println("FOUND A MATCH");
System. out .println("currentLink: " + currentLink);
System. out .println("firstLink: " + firstLink);
previousLink.next = currentLink.next;
}
return currentLink;
}
}
Sample Output
References
Treehouse.com
Eclipseide.org
www.quora.com
1
1
1
1
JUBAIL UNIVERSITY COLLEGE
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
SEMESTER 382
GROUP ASSIGNMENT (8%)
Course Code
CS 205
Course Title
Data Structures
Section
Date Given
26/03/2018
Date of Submission
PART I
TO BE FILLED BY THE STUDENT
STUDENT’S NAME
ID. No.
STUDENT’S NAME
ID. No.
STUDENT’S NAME
ID. No.
TO BE FILLED BY THE CONCERNED DEPARTMENT
PART II
1
st
Marker
Area of Assessment
Max
Marks
Actual
Marks
Comments/Remarks
Project Documentation
10
System Functionality
18
Presentation
4
Total
32
Name:
1
JUBAIL UNIVERSITY COLLEGE
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
SEMESTER 382
GROUP ASSIGNMENT (8%)
Course Code CS 205 Course Title Data Structures Section
Date Given 26/03/2018 Date of Submission
PART I TO BE FILLED BY THE STUDENT
STUDENT’S NAME ID. No.
STUDENT’S NAME ID. No.
STUDENT’S NAME ID. No.
TO BE FILLED BY THE CONCERNED DEPARTMENT
PART II 1
st
Marker
Area of Assessment Max
Marks
Actual
Marks
Comments/Remarks
Project Documentation 10
System Functionality 18
Presentation 4
Total 32
Name:
data/LinkeList.jar
META-INF/MANIFEST.MF
Manifest-Version: 1.0 Rsrc-Class-Path: ./ Class-Path: . Rsrc-Main-Class: Link Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
org/eclipse/jdt/internal/jarinjarloader/JIJConstants.class
package org.eclipse.jdt.internal.jarinjarloader; final synchronized class JIJConstants { static final String REDIRECTED_CLASS_PATH_MANIFEST_NAME = Rsrc-Class-Path; static final String REDIRECTED_MAIN_CLASS_MANIFEST_NAME = Rsrc-Main-Class; static final String DEFAULT_REDIRECTED_CLASSPATH = ; static final String MAIN_METHOD_NAME = main; static final String JAR_INTERNAL_URL_PROTOCOL_WITH_COLON = jar:rsrc:; static final String JAR_INTERNAL_SEPARATOR = !/; static final String INTERNAL_URL_PROTOCOL_WITH_COLON = rsrc:; static final String INTERNAL_URL_PROTOCOL = rsrc; static final String PATH_SEPARATOR = /; static final String CURRENT_DIR = ./; static final String UTF8_ENCODING = UTF-8; static final String RUNTIME = #runtime; void JIJConstants(); }
org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader$ManifestInfo.class
package org.eclipse.jdt.internal.jarinjarloader; synchronized class JarRsrcLoader$ManifestInfo { String rsrcMainClass; String[] rsrcClassPath; private void JarRsrcLoader$ManifestInfo(); }
org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader.class
package org.eclipse.jdt.internal.jarinjarloader; public synchronized class JarRsrcLoader { public void JarRsrcLoader(); public static void main(String[]) throws ClassNotFoundException, IllegalArgumentException, IllegalAccessException, reflect.InvocationTargetException, SecurityException, NoSuchMethodException, java.io.IOException; private static ClassLoader getParentClassLoader() throws reflect.InvocationTargetException, IllegalAccessException; private static JarRsrcLoader$ManifestInfo getManifestInfo() throws java.io.IOException; private static String[] splitSpaces(String); }
org/eclipse/jdt/internal/jarinjarloader/RsrcURLConnection.class
package org.eclipse.jdt.internal.jarinjarloader; public synchronized class RsrcURLConnection extends java.net.URLConnection { private ClassLoader classLoader; public void RsrcURLConnection(java.net.URL, ClassLoader); public void connect() throws java.io.IOException; public java.io.InputStream getInputStream() throws java.io.IOException; }
org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.class
package org.eclipse.jdt.internal.jarinjarloader; public synchronized class RsrcURLStreamHandler extends java.net.URLStreamHandler { private ClassLoader classLoader; public void RsrcURLStreamHandler(ClassLoader); protected java.net.URLConnection openConnection(java.net.URL) throws java.io.IOException; protected void parseURL(java.net.URL, String, int, int); }
org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandlerFactory.class
package org.eclipse.jdt.internal.jarinjarloader; public synchronized class RsrcURLStreamHandlerFactory implements java.net.URLStreamHandlerFactory { private ClassLoader classLoader; private java.net.URLStreamHandlerFactory chainFac; public void RsrcURLStreamHandlerFactory(ClassLoader); public java.net.URLStreamHandler createURLStreamHandler(String); public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory); }
Link.class
public synchronized class Link { public String bookName; public int booksSold; public Link next; public void Link(String, int); public void display(); public String toString(); public static void main(String[]); }
LinkList.class
synchronized class LinkList { public Link firstLink; void LinkList(); public boolean isEmpty(); public void insertFirstLink(String, int); public Link removeFirst(); public void display(); public Link find(String); public Link removeLink(String); }
data/stacks and queues 2.jar
META-INF/MANIFEST.MF
Manifest-Version: 1.0 Rsrc-Class-Path: ./ Class-Path: . Rsrc-Main-Class: Link Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
org/eclipse/jdt/internal/jarinjarloader/JIJConstants.class
package org.eclipse.jdt.internal.jarinjarloader; final synchronized class JIJConstants { static final String REDIRECTED_CLASS_PATH_MANIFEST_NAME = Rsrc-Class-Path; static final String REDIRECTED_MAIN_CLASS_MANIFEST_NAME = Rsrc-Main-Class; static final String DEFAULT_REDIRECTED_CLASSPATH = ; static final String MAIN_METHOD_NAME = main; static final String JAR_INTERNAL_URL_PROTOCOL_WITH_COLON = jar:rsrc:; static final String JAR_INTERNAL_SEPARATOR = !/; static final String INTERNAL_URL_PROTOCOL_WITH_COLON = rsrc:; static final String INTERNAL_URL_PROTOCOL = rsrc; static final String PATH_SEPARATOR = /; static final String CURRENT_DIR = ./; static final String UTF8_ENCODING = UTF-8; static final String RUNTIME = #runtime; void JIJConstants(); }
org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader$ManifestInfo.class
package org.eclipse.jdt.internal.jarinjarloader; synchronized class JarRsrcLoader$ManifestInfo { String rsrcMainClass; String[] rsrcClassPath; private void JarRsrcLoader$ManifestInfo(); }
org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader.class
package org.eclipse.jdt.internal.jarinjarloader; public synchronized class JarRsrcLoader { public void JarRsrcLoader(); public static void main(String[]) throws ClassNotFoundException, IllegalArgumentException, IllegalAccessException, reflect.InvocationTargetException, SecurityException, NoSuchMethodException, java.io.IOException; private static ClassLoader getParentClassLoader() throws reflect.InvocationTargetException, IllegalAccessException; private static JarRsrcLoader$ManifestInfo getManifestInfo() throws java.io.IOException; private static String[] splitSpaces(String); }
org/eclipse/jdt/internal/jarinjarloader/RsrcURLConnection.class
package org.eclipse.jdt.internal.jarinjarloader; public synchronized class RsrcURLConnection extends java.net.URLConnection { private ClassLoader classLoader; public void RsrcURLConnection(java.net.URL, ClassLoader); public void connect() throws java.io.IOException; public java.io.InputStream getInputStream() throws java.io.IOException; }
org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.class
package org.eclipse.jdt.internal.jarinjarloader; public synchronized class RsrcURLStreamHandler extends java.net.URLStreamHandler { private ClassLoader classLoader; public void RsrcURLStreamHandler(ClassLoader); protected java.net.URLConnection openConnection(java.net.URL) throws java.io.IOException; protected void parseURL(java.net.URL, String, int, int); }
org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandlerFactory.class
package org.eclipse.jdt.internal.jarinjarloader; public synchronized class RsrcURLStreamHandlerFactory implements java.net.URLStreamHandlerFactory { private ClassLoader classLoader; private java.net.URLStreamHandlerFactory chainFac; public void RsrcURLStreamHandlerFactory(ClassLoader); public java.net.URLStreamHandler createURLStreamHandler(String); public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory); }
Link.class
public synchronized class Link { public String bookName; public int booksSold; public Link next; public void Link(String, int); public void display(); public String toString(); public static void main(String[]); }
LinkList.class
synchronized class LinkList { public Link firstLink; void LinkList(); public boolean isEmpty(); public void insertFirstLink(String, int); public Link removeFirst(); public void display(); public Link find(String); public Link removeLink(String); }
data/stacks.docx
JUBAIL UNIVERSITY COLLEGE
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
SEMESTER 382
GROUP ASSIGNMENT (8%)
|
Course Code |
CS 205 |
Course Title |
Data Structures |
Section |
|
|
Date Given |
26/03/2018 |
Date of Submission |
|
|
|
PART I |
TO BE FILLED BY THE STUDENT |
|
|
|
STUDENT’S NAME |
|
ID. No. |
|
|
STUDENT’S NAME |
|
ID. No. |
|
|
STUDENT’S NAME |
|
ID. No. |
|
|
|
|
|
|
TO BE FILLED BY THE CONCERNED DEPARTMENT
|
PART II |
|
|
1st Marker |
|
Area of Assessment |
Max Marks |
Actual Marks |
Comments/Remarks |
|
Project Documentation |
10 |
|
|
|
System Functionality |
18 |
|
|
|
Presentation |
4 |
|
|
|
Total |
32 |
|
|
|
|
|
Name: |
|
|
|
|
Signature |
: |
Introduction
PROJECT DESCRIPTION
The students need to form groups consisting of 3 members. Each group has to develop TWO (2) Java applications by applying any suitable Data Structures (Linked List, Stack and Queue) studied in this course. The applications can be developed for handling the student list, employee list, shopping list, book list, seminar reservation, hall reservation, air-ticket reservation, hotel reservation, stock inventory, sales invoice or any other. The nodes of each data structure should include at least FOUR (4) fields/attributes appropriate to the applications. Each application should include at least FOUR (4) basic operations performed on the data structures (such as insert, update, delete, search or print). And, include at least ONE (1) new operation/method in each application. (For example, sorting the elements (in ascending/descending order) in the linked list, retrieving/modifying the set of nodes in the list that satisfies the given condition, deleting the set of nodes from the list that satisfies the given condition, adding/removing the elements as per priority in the queue, swapping the elements in the Stack etc.)
Application of stacks and queues.
The data structures most are used to such as Arrays, linked lists, trees, etc. are best for data that represents real objects. Stacks and Queues are instead used to complete a task and are soon after discarded.
A major difference is that stacks and queues allow only a single item to be added or removed at a time. Stacks then provide access to the last item in, while queues provide access to the first item in. The video and code below will cover everything.
Program listing
Main Class- The Stacks
// Arrays, linked lists, trees, etc. are best for
// data that represents real objects.
// Stacks & Queues are instead used to complete a
// task and are soon after discarded.
// Stacks & Queues
// 1. Allow only a single item to be added or removed at a time
// 2. Stacks allow access to the last item inserted (LIFO)
// 3. Queues allow access to the first item inserted (FIFO)
import java.util.Arrays;
public class TheStack {
private String[] stackArray;
private int stackSize;
// Sets stack as empty
private int topOfStack = -1;
TheStack(int size){
stackSize = size;
stackArray = new String[size];
// Assigns the value of -1 to every value in the array
// so I control what gets printed to screen
Arrays.fill(stackArray, "-1");
}
public void push(String input){
if(topOfStack+1 < stackSize){
topOfStack++;
stackArray[topOfStack] = input;
} else System.out.println("Sorry But the Stack is Full");
displayTheStack();
System.out.println("PUSH " + input + " Was Added to the Stack\n");
}
public String pop(){
if(topOfStack >= 0){
displayTheStack();
System.out.println("POP " + stackArray[topOfStack] + " Was Removed From the Stack\n");
// Just like in memory an item isn't deleted, but instead is just not available
stackArray[topOfStack] = "-1"; // Assigns -1 so the value won't appear
return stackArray[topOfStack--];
} else {
displayTheStack();
System.out.println("Sorry But the Stack is Empty");
return "-1";
}
}
public String peek(){
displayTheStack();
System.out.println("PEEK " + stackArray[topOfStack] + " Is at the Top of the Stack\n");
return stackArray[topOfStack];
}
public void pushMany(String multipleValues){
String[] tempString = multipleValues.split(" ");
for(int i = 0; i < tempString.length; i++){
push(tempString[i]);
}
}
public void popAll(){
for(int i = topOfStack; i >= 0; i--){
pop();
}
}
public void popDisplayAll(){
String theReverse = "";
for(int i = topOfStack; i >= 0; i--){
theReverse += stackArray[i];
}
System.out.println("The Reverse: " + theReverse);
popAll();
}
public void displayTheStack(){
for(int n = 0; n < 61; n++)System.out.print("-");
System.out.println();
for(int n = 0; n < stackSize; n++){
System.out.format("| %2s "+ " ", n);
}
System.out.println("|");
for(int n = 0; n < 61; n++)System.out.print("-");
System.out.println();
for(int n = 0; n < stackSize; n++){
if(stackArray[n].equals("-1")) System.out.print("| ");
else System.out.print(String.format("| %2s "+ " ", stackArray[n]));
}
System.out.println("|");
for(int n = 0; n < 61; n++)System.out.print("-");
System.out.println();
}
public static void main(String[] args){
TheStack theStack = new TheStack(10);
theStack.push("10");
theStack.push("17");
theStack.push("13");
// Look at the top value on the stack
theStack.peek();
// Remove values from the stack (LIFO)
theStack.pop();
theStack.pop();
theStack.pop();
// Add many to the stack
theStack.pushMany("R E D R U M");
// Remove all from the stack
// theStack.popAll();
// Remove all from the stack and print them
theStack.popDisplayAll();
theStack.displayTheStack();
}
}
The Queue
import java.util.Arrays;
public class TheQueue {
private String[] queueArray;
private int queueSize;
// Sets stack as empty
private int front, numberOfItems, rear = 0;
TheQueue(int size){
queueSize = size;
queueArray = new String[size];
// Assigns the value of -1 to every value in the array
// so I control what gets printed to screen
Arrays.fill(queueArray, "-1");
}
public void insert(String input){
if(numberOfItems + 1 <= queueSize){
queueArray[rear] = input;
rear++;
numberOfItems++;
System.out.println("INSERT " + input + " Was Added to the Stack\n");
} else {
System.out.println("Sorry But the Queue is Full");
}
}
// This priority insert will add items in order from high to low
public void priorityInsert(String input){
int i;
if(numberOfItems == 0){
insert(input);
} else {
for(i = numberOfItems-1; i >= 0; i--){
if(Integer.parseInt(input) > Integer.parseInt(queueArray[i])){
queueArray[i+1] = queueArray[i];
} else break; // Done shifting items in queue
}
queueArray[i+1] = input;
rear++;
numberOfItems++;
}
}
public void remove(){
if(numberOfItems > 0){
System.out.println("REMOVE " + queueArray[front] + " Was Removed From the Queue\n");
// Just like in memory an item isn't deleted, but instead is just not available
queueArray[front] = "-1";
front++;
numberOfItems--;
} else {
System.out.println("Sorry But the Queue is Empty");
}
}
public void peek(){
System.out.println("The First Element is " + queueArray[front]);
}
public void displayTheQueue(){
for(int n = 0; n < 61; n++)System.out.print("-");
System.out.println();
for(int n = 0; n < queueSize; n++){
System.out.format("| %2s "+ " ", n);
}
System.out.println("|");
for(int n = 0; n < 61; n++)System.out.print("-");
System.out.println();
for(int n = 0; n < queueSize; n++){
if(queueArray[n].equals("-1")) System.out.print("| ");
else System.out.print(String.format("| %2s "+ " ", queueArray[n]));
}
System.out.println("|");
for(int n = 0; n < 61; n++)System.out.print("-");
System.out.println();
// Number of spaces to put before the F
int spacesBeforeFront = 3*(2*(front+1)-1);
for(int k = 1; k < spacesBeforeFront; k++)System.out.print(" ");
System.out.print("F");
// Number of spaces to put before the R
int spacesBeforeRear = (2*(3*rear)-1) - (spacesBeforeFront);
for(int l = 0; l < spacesBeforeRear; l++)System.out.print(" ");
System.out.print("R");
System.out.println("\n");
}
public static void main(String[] args){
TheQueue theQueue = new TheQueue(10);
theQueue.priorityInsert("16");
theQueue.priorityInsert("25");
theQueue.priorityInsert("10");
/*
theQueue.insert("10");
theQueue.displayTheQueue();
theQueue.insert("15");
theQueue.displayTheQueue();
theQueue.insert("25");
theQueue.displayTheQueue();
theQueue.insert("25");
theQueue.displayTheQueue();
theQueue.insert("25");
*/
theQueue.displayTheQueue();
theQueue.remove();
theQueue.displayTheQueue();
theQueue.remove();
theQueue.displayTheQueue();
theQueue.peek();
}
}
Sample Output
References
Treehouse.com
Eclipseide.org
www.quora.com
1
1
1
1
JUBAIL UNIVERSITY COLLEGE
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
SEMESTER 382
GROUP ASSIGNMENT (8%)
Course Code
CS 205
Course Title
Data Structures
Section
Date Given
26/03/2018
Date of Submission
PART I
TO BE FILLED BY THE STUDENT
STUDENT’S NAME
ID. No.
STUDENT’S NAME
ID. No.
STUDENT’S NAME
ID. No.
TO BE FILLED BY THE CONCERNED DEPARTMENT
PART II
1
st
Marker
Area of Assessment
Max
Marks
Actual
Marks
Comments/Remarks
Project Documentation
10
System Functionality
18
Presentation
4
Total
32
Name:
1
JUBAIL UNIVERSITY COLLEGE
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
SEMESTER 382
GROUP ASSIGNMENT (8%)
Course Code CS 205 Course Title Data Structures Section
Date Given 26/03/2018 Date of Submission
PART I TO BE FILLED BY THE STUDENT
STUDENT’S NAME ID. No.
STUDENT’S NAME ID. No.
STUDENT’S NAME ID. No.
TO BE FILLED BY THE CONCERNED DEPARTMENT
PART II 1
st
Marker
Area of Assessment Max
Marks
Actual
Marks
Comments/Remarks
Project Documentation 10
System Functionality 18
Presentation 4
Total 32
Name:
data/StacksandQueues.jar
META-INF/MANIFEST.MF
Manifest-Version: 1.0
Link.class
public synchronized class Link { public String bookName; public int booksSold; public Link next; public void Link(String, int); public void display(); public String toString(); public static void main(String[]); }
LinkList.class
synchronized class LinkList { public Link firstLink; void LinkList(); public boolean isEmpty(); public void insertFirstLink(String, int); public Link removeFirst(); public void display(); public Link find(String); public Link removeLink(String); }
.classpath
.project
LinkedLists org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature
TheStack.class
public synchronized class TheStack { private String[] stackArray; private int stackSize; private int topOfStack; void TheStack(int); public void push(String); public String pop(); public String peek(); public void pushMany(String); public void popAll(); public void popDisplayAll(); public void displayTheStack(); public static void main(String[]); }
Stacks/package-info.class
package Stacks; abstract interface package-info { }
Stacks/TheQueue.class
package Stacks; public synchronized class TheQueue { private String[] queueArray; private int queueSize; private int front; private int numberOfItems; private int rear; void TheQueue(int); public void insert(String); public void priorityInsert(String); public void remove(); public void peek(); public void displayTheQueue(); public static void main(String[]); }
data/ty.jar
META-INF/MANIFEST.MF
Manifest-Version: 1.0
Link.class
public synchronized class Link { public String bookName; public int millionsSold; public Link next; public void Link(String, int); public void display(); public String toString(); public static void main(String[]); }
LinkList.class
synchronized class LinkList { public Link firstLink; void LinkList(); public boolean isEmpty(); public void insertFirstLink(String, int); public Link removeFirst(); public void display(); public Link find(String); public Link removeLink(String); }
.project
LinkedLists org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature
.classpath