Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are given a partially completed program hw06q1.c. The structure of this homework is similar to previous homework. In this homework, you should use linked

You are given a partially completed program hw06q1.c. The structure of this homework is similar to previous homework. In this homework, you should use linked list to do the same work in the previous homework.

You should follow the instructions given in the program to complete the functions so that the program executes properly. You will be completing a program that creates a linked list of books.

It is a menu-driven program where the user is given the following options:

  1. Add a new student to the list. When adding a new student to the list, the user is prompted for student's name, major, school year of student and ID number of the student. The student should be added at sorted position. If the student already exists in the list, then you should not add to the list. The school year is enum type. The sorting should happen within the list. You should not create a new linked list of students having sorted students.

  1. Display the list of students. This should display each students details one after the other.
  2. Remove the student from the linked list. After removing the student, the linked list should not be broken.

Expected output of each menu option: (similar as previous homework) addSort:

image text in transcribed

image text in transcribed

displayList: image text in transcribed

image text in transcribed

CSE240 HW6 Currently a student(s) on the list. Enter your selection: a: add a new student d: display student list r: remove a student from the list q: quit Enter student name: Eden Hazard Enter major: CSE Enter whether student is 'freshman' or 'sophomore' or 'junior' or 'senior': junior Please enter ID number: 111 student successfully added to the list! Currently 1 student(s) on the list. Enter your selection: a: add a new student d: display student list ir: remove a student from the list q: quit Enter student name: William Borges Enter major: EE Enter whether student is 'freshman' or 'sophomore' or 'junior' or 'senior': senior Please enter ID number: 222 student successfully added to the list! Currently 2 student(s) on the list. Enter your selection: a: add a new student d: display student list r: remove a student from the list q: quit Enter student name: David Luiz Enter major: CSE Enter whether student is 'freshman' or 'sophomore' or 'junior' or 'senior': freshman Please enter ID number: 333 student successfully added to the list! Currently 3 student(s) on the list. Enter your selection: a: add a new student d: display student list r: remove a student from the list q: quit Student name: Eden Hazard Student major: CSE SchoolYear: junior ID number: 111 Student name: David Luiz, Student major: CSE SchoolYear: freshman ID number: 333 Student name: William Borges Student major: CSE SchoolYear: senior ID number: 222 Currently 3 student(s) on the list. Enter your selection: a: add a new student d: display student list ir: remove a student from the list q: quit Currently 3 student(s) on the list. Enter your selection: a: add a new student d: display student list r: remove a student from the list q: quit Please enter student name: Eden Hazard Student successfully removed from the list. Currently 2 student(s) on the list. Enter your selection: a: add a new student d: display student list r: remove a student from the list q: quit Student name: David Luiz Student major: CSE SchoolYear: freshman ID number: 333 Student name: William Borges Student major: CSE School Year: senior ID number: 222 Currently 2 student(s) on the list. Enter your selection: a: add a new student d: display student list r: remove a student from the list q: quit

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

Step: 3

blur-text-image

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

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

Students also viewed these Databases questions