User Tools

Site Tools


Sidebar

projects

wcp1 (due 20240124)
pct0 (bonus; due 20240125)
pct1 (bonus; due 20240125)
abc0 (due 20240131)
btt0 (due 20240131)
pct2 (due 20240131)
wcp2 (due 20240131)
mpg0 (due 20240207)
pct3 (bonus; due 20240207)
wcp3 (due 20240207)
mpg1 (due 20240214)
pct4 (due 20240214)
wcp4 (due 20240214)
bwp1 (bonus; due 20240228)
mpg2 (due 20240228)
pct5 (bonus; due 20240228)
wcp5 (due 20240228)
cgf0 (due 20240306)
gfo0 (due 20240306)
pct6 (due 20240306)
wcp6 (due 20240306)
cgf1 (due 20240313)
pct7 (bonus; due 20240313)
wcp7 (due 20240313)
cgf2 (due 20240320)
pct8 (due 20240320)
wcp8 (due 20240320)
pct9 (bonus; due 20240327)
wcp9 (due 20240327)
bwp2 (bonus; due 20240410)
cgf3 (due 20240410)
gfo1 (due 20240410)
pctA (due 20240410)
wcpA (due 20240410)
pctB (bonus; due 20240417)
waq0 (due 20240417)
wcpB (due 20240417)
pctC (due 20240424)
waq1 (due 20240424)
wcpC (due 20240424)
pctD (bonus; due 20240501)
wcpD (bonus; due 20240501)
gfo2 (due 20240508)
pctE (bonus; due 20240508)
wcpE (bonus; due 20240508)
EoCE (due 20240516)
haas:spring2024:data:projects:sll1

Corning Community College

CSCS2320 Data Structures

PROJECT: Singly-Linked List of Nodes (SLL1)

OBJECTIVE

To continue to enhance our ability to explore various algorithmic and computing realms through the exploration and cultivation of debugging and troubleshooting skills, and collaboratively authoring and documenting the project and its specifications.

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-sll1

EDIT

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

BACKGROUND

Continuing with our single-linked list, this week we are expanding our library with 5 new functions for list processing.

SPECIFICATIONS

After you make upgrade-sll1, you will find five new .c files in the /sll1/src/list/ directory:

  • append.c (use insert for reference)
  • cp.c (will have to make use of mklist and maybe cpnode())
  • displayb.c (display but backwards)
  • search.c (similar logic to getpos())
  • compare.c (use strcmp() for reference)

It is recommended to work on them in that order.

However, unlike sll0, unit tests for these functions do not rely on each other so the order in which you complete them are up to you. This is just the recommended path.

Each file contains its corresponding functions.

Another thing to note is that the sll1 project files can only compile with version 9 of gcc. If you are not on lab46 and the project fails to build the library or unit tests, this may be because you are using a newer or older version of gcc.

You can use the same version of gcc as lab46 by using the following commands (assuming you are using a Raspberry Pi with it's default OS) in this link: https://gist.github.com/sol-prog/95e4e7e3674ac819179acf33172de8a9

*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

PROGRAM

We will be creating more functions for our lists, similar to what we've done for the previous two projects. The functions are as follows:

displayb(): displays the contents of a list backwards.

append(): Adds a node into a list after the specified place. For example, if our list is (4)→(6)→(8)→NULL, and we append 7 into (6), then our list will be (4)→(6)→(7)→(8)→NULL. Note that append() will not be a simple modification of the insert() function from sll0, it must handle special cases where the user wants to insert a node on a NULL position.

compare(): Will read two given lists. At the first node of difference the function will output a < or > sign depending on which node held a higher value.

cp(): Will create a copy of a list

search(): Will be given a value and a list, after which the function will search through the list until it finds the first node containing the given value. The function will then return a pointer to the node of matching value.

OUTPUT SPECIFICATIONS

Besides displayb(), nothing will be displayed from these functions individually. However, the return values and what they do to the list are specified above in the program section.

Compare will return a value, uc, specified within the included header files. The return value should be equal to the total amount of differences in the lists. The pos value, if not null, should be the position of the first difference in the two lists. For example, if you have two lists with a difference at position 3, 7, and 14, the function should return the value of all of the COMP_L(1 or 2 goes here)_(GREATER or LESS) combined. If pos is null, it should not change from null.

DEBUG: If you run into an issue that requires in-depth debugging, consider using gdb. To run gdb type gdb bin/(file to debug), then type run. If you need to do further debugging you can make use of list (lists lines) and break # for the line you want to set a breakpoint on. You can use display to show the values of variables, and you can make use of N (next), S(step), and C(continue-resume the execution to breakpoint).

UNIT TESTS

Unit Tests will consist of 58 different tests as to which you are provided to check the functionality of your code. For more specific outputs, you can check the unit tests inside /unit/list/. Remember that the code for these are provided to you and free for you to modify. If you need to add stuff to these unit tests to help you debug your code feel free, just make sure to comment what you added and remove it later once you are done. Including examples of successful runs of these tests would make this page very large, so if you would like examples of successful tests feel free to ask on discord.

Also note that some unit tests for sll1 make use of certain functions made in previous projects. So if some of the functions from sll0 aren’t up to par, it’s likely to cause problems trying to pass the unit tests for sll1.

Some might find their unit-compare test is failing for test #8, where pos is checked, but not for test #13 and test #14, where pos is also checked. This is likely due to only changing pos when CMP_EQUALITY is not the case. As a solution, consider always changing pos to reflect the position being checked even if both lists are equal.

 

SUBMISSION

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

  • Project must be submit on time, by the deadline.
    • Late submissions will lose 33% credit per day, with the submission window closing on the 3rd day following the deadline.
  • All code must compile cleanly (no warnings or errors)
    • Compile with the -Wall and –std=gnu18 compiler flags
    • all requested functionality must conform to stated requirements (either on this document or in a comment banner in source code files themselves).
  • Executed programs must display in a manner similar to provided output
    • output formatted, where applicable, must match that of project requirements
  • Processing must be correct based on input given and output requested
  • Output, if applicable, must be correct based on values input
  • Code must be nicely and consistently indented
  • Code must be consistently written, to strive for readability from having a consistent style throughout
  • Code must be commented
    • Any “to be implemented” comments MUST be removed
      • these “to be implemented” comments, if still present at evaluation time, will result in points being deducted.
      • Sufficient comments explaining the point of provided logic MUST be present
  • No global variables (without instructor approval), no goto statements, no calling of main()!
  • Track/version the source code in your lab46 semester repository
  • Submit a copy of your source code to me using the submit tool (make submit on lab46 will do this) by the deadline.

Submit Tool Usage

Let's say you have completed work on the project, and are ready to submit, you would do the following (assuming you have a program called uom0.c):

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:

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

Pertaining to the collaborative authoring of project documentation

  • each class member is to participate in the contribution of relevant information and formatting of the documentation
    • minimal member contributions consist of:
      • near the class average edits (a value of at least four productive edits)
      • near the average class content change average (a value of at least 256 bytes (absolute value of data content change))
      • near the class content contribution average (a value of at least 1kiB)
      • no adding in one commit then later removing in its entirety for the sake of satisfying edit requirements
    • adding and formatting data in an organized fashion, aiming to create an informative and readable document that anyone in the class can reference
    • content contributions will be factored into a documentation coefficient, a value multiplied against your actual project submission to influence the end result:
      • no contributions, co-efficient is 0.50
      • less than minimum contributions is 0.75
      • met minimum contribution threshold is 1.00

Additionally

  • Solutions not abiding by spirit of project will be subject to a 50% overall deduction
  • Solutions not utilizing descriptive why and how comments will be subject to a 25% overall deduction
  • Solutions not utilizing indentation to promote scope and clarity or otherwise maintaining consistency in code style and presentation will be subject to a 25% overall deduction
  • Solutions not organized and easy to read (assume a terminal at least 90 characters wide, 40 characters tall) are subject to a 25% overall deduction
haas/spring2024/data/projects/sll1.txt · Last modified: 2022/09/12 12:52 by 127.0.0.1