Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

file- (5,153,65) (5,203,80) (10,354,92) (2,354,87) (3,559,90) (5,439,77) (2,223,89) (7,448,92) (8,559,86) (8,478,85) A program that can not compile and run will receive zero point. Three projects

file-

(5,153,65) (5,203,80) (10,354,92) (2,354,87) (3,559,90) (5,439,77) (2,223,89) (7,448,92) (8,559,86) (8,478,85)

image text in transcribed

A program that can not compile and run will receive zero point. Three projects will be assigned this semester, and students have to accomplish two among three. Honors students have to accomplish three and an additional project later. MULTILIST CONSTRUCTION AND PRINT Grader: Li Lin Design a program of multilist to host student-class data. Each node in the multilist should have spaces to store \{student number, class number, grade\} in the ranges of {110000,13000,0100} respectively. The first row is a student list indexing student number. The first column is a class list indexing class number. Such nodes can be initiated accordingly after a student-class pair is input. Grade can be asked after the node is inserted or remain as empty (until late input). A. Input data and insert nodes with searching function. (20pt) 1 Input from console by typing (student number, class number), e.g., (4,130), which means student 4 takes course 130 . The program will insert a node to the multilist and connect it horizontally and vertically in the order of student number and class number by linked list pointers with the nodes already there. Read this txt file and take each line as input.multilist input.txt B. Print for output student list and class list as follows. (10pt) 2. Print class lists for all non-empty classes, e.g., class 1 : students 3,4,6,; class 34 : students 5,98,123,; 3 Print student lists for all active students who take courses, e.g., student 1: classes 355, 389, 991; student 2: classes 5,6,98; student 89 : classes 65,456 ; Hint: No existing linked list class can be used directly in building this multilist due to encapsulated class definition. Although the multilist structure should host input of students (up to 10000 ) and classes up to 3000 , the data node will not be created until a real input is given. No empty 2D array should be created in advance. That will save a lot of memory if only a few nodes, i.e., students and classes, are input eventually. To achieve these print functions, searching/finding nodes in current multilist is necessary for the program. Searching has two phases going through a student index list and then class list. respectively. If a node can not be found either in the index list or student-class pair list, an insertion of new node is needed. If at the very beginning, the student index node or class index node is not existing, you need to create such a node first accordingly. If a student-class pair has been created on one chain, it needs to be wired in the other chain in correct order as well. The index nodes here are the first-row nodes for students, and first column nodes for classes. Use 0 for dummy fields in both class index nodes and student index nodes, rather than creating separate arrays or different data structure. This will keep your program the minimum. For details, please refer to slides of Multilist. CODE should be submitted in zipped file via CANVAS with a note describing running environment, language, and compiling instruction

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

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

What is a prototype, and what is its purpose? AppendixLO1

Answered: 1 week ago

Question

What laws have been passed to legislate ethics?

Answered: 1 week ago

Question

Working with other project stakeholders for support.

Answered: 1 week ago

Question

Knowledge of project management (PMI) teachings

Answered: 1 week ago