Professional Documents
Culture Documents
COMP512Final Project-20212
COMP512Final Project-20212
1. Implement a Student Info using appropriate data structure with the following
requirements
a. It should maintain the following details of each student. Student Name, Student
ID, Department, Mobile Number, email Address. Use java programming
construct to print the details.
b. Consider the scenario where the grades of the students are stored in a nonlinear
data structure. Use appropriate traversal techniques and implement it in Java to
sort the data in ascending order.
c. Use the concept of singly link list to store the names of 10 students and print
them.
Marking Scheme:
i. Specifications (12marks-4 marks for each program)
ii. Coding Standards (12 marks-4 marks for each program)
iii. Runtime (12marks-4 marks for each program)
iv. Communication Skills/Presentation (4 marks)
v. Team member support- 5 marks for overall project work
vi. Teamwork- 5 marks for overall project work
vii. Quality of work- 5marks for overall project work
Dr. Nivas Mohideen Jinna Dr. Sridevi Narayanan Dr. Anupama Prasanth
Course Coordinator Programme Head College Dean
Date: 23.03.2022 Date: 23.03.2022 Date: 23.03.2022
COLLEGE OF COMPUTER STUDIES
Trimester: 2nd, AY 2021-2022
COMP512 DATA STRUCTURES
In-Course Project
naming). unambiguous
naming).
Runtime Executes without Executes without Executes without Does not execute due to
errors, excellent user errors, user prompts errors, user prompts errors, user prompts are
prompts, good use of are understandable, contain little misleading or non-
symbols, and spacing in minimum use of information, poor existent.
output symbols or spacing in design.
output
Dr. Nivas Mohideen Jinna Dr. Sridevi Narayanan Dr. Anupama Prasanth
Course Coordinator Programme Head College Dean
Date: 23.03.2022 Date: 23.03.2022 Date: 23.03.2022
COLLEGE OF COMPUTER STUDIES
Trimester: 2nd, AY 2021-2022
COMP512 DATA STRUCTURES
In-Course Project
Comments/Remarks:
import java.io.*;
import java.util.*;
class LinkedList {
Node head;
static class Node {
String name,address, dept;
int id,mobile;
Node next;
Node(String n,String a,String d,int i,int m){
name=n;
address=a;
dept=d;
id=i;
mobile=m;
next = null;
}
}
public static LinkedList insert(LinkedList list, String n,String a,String d,int i,int m){
Node new_node = new Node(n,a,d,i,m);
new_node.next = null;
if (list.head == null) {
list.head = new_node;
}
else {
Node last = list.head;
while (last.next != null) {
last = last.next;
}
last.next = new_node;
}
return list;
}
public static void printList(LinkedList list)
{
Node currNode = list.head;
System.out.println("LinkedList: ");
while (currNode != null) {
System.out.println(currNode.name + " "+currNode.address + " "+currNode.dept + "
"+currNode.id + " "+currNode.mobile);
currNode = currNode.next;
Dr. Nivas Mohideen Jinna Dr. Sridevi Narayanan Dr. Anupama Prasanth
Course Coordinator Programme Head College Dean
Date: 23.03.2022 Date: 23.03.2022 Date: 23.03.2022
COLLEGE OF COMPUTER STUDIES
Trimester: 2nd, AY 2021-2022
COMP512 DATA STRUCTURES
In-Course Project
}
}
public static void sortList(LinkedList list)
{
Node current = list.head, index = null;
String n,d,a;
int i,m;
if (list.head == null) {
return;
}
else {
while (current != null) {
index = current.next;
while (index != null) {
if ((current.name).compareTo(index.name)>0) {
n=current.name;
a=current.address;
d=current.dept;
i=current.id;
m=current.mobile;
current.name=index.name;
current.address=index.address;
current.dept=index.dept;
current.id=index.id;
current.mobile=index.mobile;
index.name=n;
index.dept=d;
index.address=a;
index.id=i;
index.mobile=m;
}
index = index.next;
}
current = current.next;
}
}
}
}
public class Main{
public static void main(String[] args)
{
LinkedList list = new LinkedList();
list = list.insert(list, "Harry","Delhi","CSE",3040,653214);
list = list.insert(list, "John","Goa","CSE",3041,653215);
list = list.insert(list, "Peter","Gujaa","IT",3042,653216);
list = list.insert(list, "Thomas","Goa","Bio",3043,653217);
list = list.insert(list, "Newt","Delhi","Arts",3044,653218);
list = list.insert(list, "Minho","UP","IT",3045,653218);
list = list.insert(list, "Brenda","MP","Bio",3046,653219);
Dr. Nivas Mohideen Jinna Dr. Sridevi Narayanan Dr. Anupama Prasanth
Course Coordinator Programme Head College Dean
Date: 23.03.2022 Date: 23.03.2022 Date: 23.03.2022
COLLEGE OF COMPUTER STUDIES
Trimester: 2nd, AY 2021-2022
COMP512 DATA STRUCTURES
In-Course Project
list = list.insert(list, "Mary","Kerala","Bio",3047,653209);
list = list.insert(list, "Max","Kashmir","ECE",3048,654612);
list = list.insert(list, "Bob","Jammu","ECE",3049,654569);
list.printList(list);
list.sortList(list);
System.out.println("Sorted List:");
list.printList(list);
}
}
Dr. Nivas Mohideen Jinna Dr. Sridevi Narayanan Dr. Anupama Prasanth
Course Coordinator Programme Head College Dean
Date: 23.03.2022 Date: 23.03.2022 Date: 23.03.2022
COLLEGE OF COMPUTER STUDIES
Trimester: 2nd, AY 2021-2022
COMP512 DATA STRUCTURES
In-Course Project
Dr. Nivas Mohideen Jinna Dr. Sridevi Narayanan Dr. Anupama Prasanth
Course Coordinator Programme Head College Dean
Date: 23.03.2022 Date: 23.03.2022 Date: 23.03.2022