The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Can someone help me with this assignment? It is supposed to be done by tomorrow night but, I will extend the deadline to the 30th if needed. Please and thank you.
CS1325 – F16Homework #6-2Assigned Nov 15, due Nov 29 at 11:59 PMThis homework assignment gives you the opportunity to practice array of pointers, linked lists and selfreferential structures.HW6-2 (Graded out of 100)Write a program that initializes two parallel arrays as follows:char * String[] = { "Abbie", "Oakley", "Sylvia", "Uwe", "Ken","Aaron", "Fabien" };double GPA[] = {3.8, 3.0, 3.9, 2.0, 2.5, 4.0, 3.2};Then the program takes the strings and GPAs from the arrays one by one, starting from element index 0,populates thestudentRecordstructure below andinserts the structure in a linked list which isinitially empty. The structure should be inserted in the right location, so as to maintain the lexicographicorder of the strings. The structures in the linked list are printed after every insertion, with the structuresbeing printed in the order they appear in the list. Finally, after all the array elements are inserted, theprogram should print again the complete content of the linked list, with the structures being printed inthe order they appear in the list. If your program is correct, the order in which the strings and GPAs areprinted should be:Aaron, 4.0, Abbie, 3.8, Fabien, 3.2, Ken, 2.5, Oakley, 3.0, Sylvia, 3.9, Uwe, 2.0.Additional requirements – Make sure you meet all the requirements to avoid losing points1.Follow the requirements in the “Homework Notes”.2.To ensure consistency in the submissions, your program must do the following:Use this self referential structurestruct studentRecord // Self referential structure used in linked list{char name[NAME_LENGTH + 1]; // set NAME_LENGTH to 10double GPA;struct studentRecord * nextPtr;};For convenience, it is recommended you use typedefs:typedef struct studentRecord Student; // Student is an alias forstruct studentRecordtypedef Student * studPtr; // studPtr is a pointer to Student3.To create the Student self referential structures, your program must usemalloc()4.You must populate the linked list through a loop. You are not allowed to create the 7 Students of thelist by writing 7 assignment statements, one for each Student in the list5.Your program must work for any set of strings used as input, not just the ones given