Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

you will build a linked list data structure for storing and organizing a student list that can be iterated in name-alphabetical order (sorted based on

you will build a linked list data structure for storing and organizing a student list that can be iterated in name-alphabetical order (sorted based on the names of the students), in surname-alphabetical order (sorted based on the surnames of the students), and in numeric order (sorted based on the student IDs). The students with their names, surnames, and IDs will be read from an input file (i.e., students.txt) and they will be organized by using a singly linked list data structure in the program. Each student struct in your linked list should contain a char pointer, as name; a char pointer named, as surname; a long integer, named as ID; a pointer to a struct with the same type, named as name_next; a pointer to a struct with the same type, named as surname_next; a pointer to a struct with the same type, named as ID_next.

You should declare a student struct with the mentioned features above. You should implement a function insertNode to insert a new node to your list. You should carefully arrange the pointers to construct different orderings. You should implement a function deleteNode to delete an existing node from your list. You should carefully arrange the pointers to maintain consistent orderings. You should implement a function printList to print the content of the linked list based three different orderings. You can use the linked list examples covered in lectures to implement these functions. Firstly, you should read the names, surnames and of the students from a given input file (i.e., students.txt). The input file name is given as a first command line argument to your program. Then, you should print the content of the list to the standard output (stdout) based on three orderings. Then, print a menu to the user containing options such as; o insert a new node to the list, o delete an existing node from the list, o print the content of the list based on the three orderings to the standard output, o print the content of the list based on the three orderings to a given output file, and o exit from the program.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

3319712721, 978-3319712727

More Books

Students also viewed these Databases questions

Question

Define Administration and Management

Answered: 1 week ago

Question

Define organisational structure

Answered: 1 week ago

Question

Define line and staff authority

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago