Table of Contents

Corning Community College

CSCS2320 Data Structures

PROJECT: Lists - Doubly-Linked Lists of Nodes (DLL2)

OBJECTIVE

We prepare to shift our focus onto a different data structure, that of doubly-linked stacks, and collaboratively authoring and documenting the project and its specifications.

OVERVIEW

With our list implementation completed, we will be making some modifications to better suit our implementation for our next intended data structure, stacks. Namely, adding the qty element to the list struct, and adding more modes to display().

UPGRADING

To assist with consistency across all implementations, project files for use with this project, along with the integration of the work you did on the last project, is made possible via a special recipe in the Makefile.

Simply go into the project base directory, and run:

lab46:~/src/SEMESTER/DESIG/prevPROJECT$ make upgrade-dll2

EDIT

You will want to go here to edit and fill in the various sections of the document:

BACKGROUND

SPECIFICATIONS

This week we are making some minor additions to the previous dll1 project.

First of all, a qty property has been added to the list struct (similar to sll3). This qty property keeps track of the number of nodes within a list. Adjust your functions to implement this new property.

  • qty: An 'unsigned long int,' that indicates the number of nodes contained within the 'list.'

Secondly, you will be redoing your display() function to include some new modes. The mode can be obtained from modding 16. Once you upgrade to dll2, your display function will be empty, but you may reuse your display code from dll1 and then add the new modes. Remember to change your invalid node handling first, otherwise you wont be able to accommodate for the new modes.

*Our task is to ask questions on Discord or in class and document our findings on this wiki page collaboratively, regarding the functionality of this project.

*For anybody interested in editing the wiki page, here is the dokuwiki user guide: https://www.dokuwiki.org/wiki:syntax#basic_text_formatting -Ash

If one is confused as to what modes correlate to what settings, this can be found in the data.h file inside the inc directory. Note that the new display maintains all the functions of the old display, so it is likely time-efficient to copy over your old display and edit it, rather than starting from scratch.

PROGRAM

Not too much to do besides display for this project. You are to add a qty similar to what we did in sll3 to all your functions that require it. Any functions that add a node, need to also increment the qty amount. While all the functions that remove a node, need to decrement the qty amount. The copy function now needs to copy the qty from the old list as well. Display will start from scratch with a fresh display.c file provided to you when you upgrade.

  • qty handling in [mklist], [append], [insert], [obtain]
  • new modes for [display]

OUTPUT SPECIFICATIONS

No new output from any function aside from display.

Display will have new modes of ASCII and Separators. The rest was previously available in your old display function.

UNIT TESTS

Unit tests this week are for the new qty values relating to your functions, and your new display function. Looking at the display unit tests is a good way to see what is the desired output for your display function and should be frequently referenced when building your display function. Unit tests are ran the same way this week as well, with make, and make check. Remember to run make clean before a new make to clean up old files. Also, you can make use of the make command -make use-test-reference. This uses a working implementation of object files from the previous dllX projects, and can very much help you if your previous projects did not pass all unit tests.

 

SUBMISSION

To be successful in this project, the following criteria (or their equivalent) must be met:

Submit Tool Usage

Let's say you have completed work on the project, and are ready to submit, you would do the following:

lab46:~/src/SEMESTER/DESIG/PROJECT$ make submit

You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.

RUBRIC

I'll be evaluating the project based on the following criteria:

65:dll2:final tally of results (65/65)
*:dll2:obtained project by the Sunday prior to duedate [6/6]
*:dll2:clean compile, no compiler messages [13/13]
*:dll2:implementation passes unit tests [13/13]
*:dll2:adequate modifications to code from template [13/13]
*:dll2:program operations conform to project specifications [13/13]
*:dll2:code tracked in lab46 semester repo [7/7]

Pertaining to the collaborative authoring of project documentation

Additionally