C++ Lab Assignment (Data abstraction)

Laboratory 04: Circularly Linked ListDownload the following files:Lab04Files.zip //provided, completed filesCLGUI.hCLGUI.cppCircularList.hCircularListIterator.hCircular List NavigationThe main reason to use a circularly (doubly) linked list is the fact that it is fast to move from the end of the list to the beginning of the list in either direction. However, to use this speed, you must first determine the number of steps to get to the destination index using next links vs. using prev links. Complete the find(int index) method in CircularList.h to make this determination.Circular List RemovalComplete the remove(int index) method in CircularList.h. To get to the requested index, call the find method. Removing the last item in the list is a special case. Set loc_pos to the removal location (set loc_pos to 0 if the last item is removed). Remember to delete nodes as appropriate, but not data.  The below class interfaces are defined in the namespace CSC2110. String methodsString(const char* text) //constructorvoid displayString()int length()const char* getText()int a_to_i()float a_to_f()String* i_to_a(int number) //static methodString* f_to_a(float number) //static methodint find(char delimiter, int start) //find the index of a particular characterString* substr(int start, int end)int compare(String* other)char charAt(int index) //0-

💡 Buy the answer for only $12 Get it now →

basedTokens methodsTokens(String* str, char delimiter) //destructor does not delete the individual tokensString* getToken(int index)int getNumTokens()void displayTokens()ReadFile methodsReadFile(const char* file_name)String* readLine()bool eof()void close()WriteFile methodsWriteLine(String* file_name)void writeLine(String* line)void close()Random methods (use getRandom first)static Random* getRandom()int getRandomInt(int lower, int upper)float getRandomFloat(float lower, float upper)Keyboard methods (use getKeyboard first)static Keyboard* getKeyboard() //call this firstint readInt(string prompt)int getValidatedInt(string prompt, int min, int max)double readDouble(string prompt)double getValidatedDouble(string prompt, double min, double max)String* readString(string prompt)Integer/Double methodsInteger(int val)/Double(double val)int getValue()/double getValue()CD methodsCD(String* artist, String* title, int year, int rating, int num_tracks)void displayCD() //display the current state of the CDString* getKey()void addSong(String* title, String* length)static int compare_items(CD* one, CD* two) //define how to compare CDs (in this case, by title)static int compare_keys(String* sk, CD* cd)static ListArray* readCDs(const char* file_name) //read in all of the CDs from a text fileSong methodsSong(String* title, String* length)void displaySong()

💡 Buy the answer for only $12 Get it now →