Himanshu G.

asked • 06/15/21

Computer Science & Information Systems Data Structures

  1. Problem Statement


In this Problem, you have to write an application in C that keeps track of student records in a university.

At a university, there is a need to store all the details of graduating students. For this exercise, let us consider that the CGPA of the student is stored against the student id.

The students ID has the following format <YYYYAAADDDD> where

YYYY - represents the year in which this student joined the university

AAA - a three letter (alphabet) representing degree program

DDDD - a four digit number representing the students roll number

For instance, an ID can be of the form 2008CSE1223 corresponding to a student who joined the university in the year 2008 in the CSE department with the roll number 1223. The university offers a 4 year graduate degree program in CSE (Computer Science and Engineering), MEC (Mechanical Engineering), ECE (Electronics and Communication Engineering) and ARC (Architecture).

In the year 2008 the first batch of 20 students were admitted to the university. Now in the year 2018, 200 students were admitted across all departments. Consider the input with a random list of students per year and their corresponding CGPA (maximum of 5.0 point CGPA).

The university now wants to use the details of all its past students to:

a.   Identify and commemorate their alumni on the 10th year anniversary of the University. For this they will need to get a list of all students who scored over x CGPA.

b.   Extend a new course offering to selected students who have secured a CGPA between a specified range. For this they will need to get a list of all students who secured between CGPA x to CGPA y in the past five years.

c.    Identify the maximum and average CGPA per department.


Design a hash table, which uses student Id as the key to hash elements into the hash table. Generate necessary hash table definitions needed and provide a design document (1 page) detailing clearly the design and the details of considerations while making this design and the reasons for the specific choice of hash function.


Design a hash function HashId() which accepts the student-ID as a parameter and returns the hash value. You are only allowed to use basic arithmetic and logic operations in implementing this hash function.

Create / populate the hash table from the list of student ID and the corresponding CGPA.


Functions:

1.   def initializeHash(self): This function creates an empty hash table and points to null.

2.   def insertStudentRec(StudentHashRecords, studentId, CGPA): This function inserts the student id and corresponding CPGA into the hash table. The inputs contains the student ID and overall graduating CGPA (decimal value with a maximum of 5.0 points).

3.   def hallOfFame(StudentHashRecords, CGPA): This function prints the list of all students who have a CGPA greater than the CGPA passed to the function. The input can be identified with the tag mentioned below

hallOfFame: 4.5


Output format:

---------- hall of fame ----------

Input: 4.5

Total eligible students: 2

Qualified students:

2008CSE1225 / 4.5

2008CSE1226 / 4.8

-------------------------------------



Sample input

2008CSE1223 / 3.5

2008CSE1224 / 3.9

2008CSE1225 / 4.5

2008CSE1226 / 4.8

2008CSE1227 / 4.1

2008MEC1001 / 4.2




           Sample o/p

---------- hall of fame ----------

Input: 4.5

Total eligible students: 2

Qualified students:

2008CSE1225 / 4.5

2008CSE1226 / 4.8

Perform an analysis of functions 2 and 3 and give the running time in terms of input size n.

Instructions

1.     Implement the problem statement in c language. Make use of virtual labs for the same.

2.     Adhere to the data structures as indicated in the problem statement

3.     Ensure that operations throw appropriate messages when their capacity is empty or full.

4.     Write appropriate comments in the code.

5.     Run time analysis should be provided in asymptotic notations and not timestamp based runtimes in sec or milliseconds.

Deliverables

1.     Source code in .c files

2.     Asymptotic analysis of functions

3.     Create "how to use/run" text file which will have sequence of commands to compile and run your code.

4.     Create a document with screen shots displaying outputs for different methods.

Evaluation

a.      The assignment carries 15 percent weightage

b.     Grading will depend on

§ Fully executable code with all functionality

§ Well-structured and commented code

§ Accuracy of the run time analysis


The strict deadline of this assignment is 17th June 2021



1 Expert Answer

By:

Patrick B. answered • 06/17/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.