Coder Social home page Coder Social logo

byu-cs235-lab6's Introduction

LinkedList Lab

Purpose

To build a single-linked list with the use of templates while handling memory management.

Background

Develop a Linked List that performs several standard operations. Linked Lists are common data structures in all object-oriented languages, and will play a vital role in your activities as a programmer.

Requirements

  • This lab must be completed on the Linux OS.
  • You will use the files in this git repository to complete the lab.
  • A short video has been created for this lab which you may find very helpful. You can watch it here.
  • You are required to use template classes that accept various types including ints, doubles, strings, etc.
  • The linked list must be a single-linked list with an external pointer only to the first node in the list. You should have a head pointer, but not a tail pointer.

Part 1 - Insertion Tests (40 points)

  • Construct a Single-Linked List that can be used with template classes and that passes all of the Test Driver's insertion tests consisting of file1.txt and file2.txt (20 points each).
  • These will test your insertHead, insertTail, and insertAfter functions.

Part 2 - Remove (24 points)

  • This will test your remove and clear functions. Includes files file3.txt and file4.txt (12 points each).

Part 3 - Comprehensive Tests (24 points)

  • Pass file5.txt of the Test Driver. This more comprehensively tests all the linked list's functions using strings.

Part 4 - No Leaks in the Hull (12 points Pass/Fail)

  • Run and pass Valgrind on your program to ensure that you have no memory leaks.

Requirement Notes

  • You may not use the predefined C++ Standard Template Library (STL) classes.
  • This lab must run on the Linux machines. The pass-off scripts will work only on those machines
  • For this lab only, due to the nature of template classes, you are strongly encouraged to implement the entire class in only a '.h'. All classes that are not templates must be implemented by a '.h' and a '.cpp'
  • Make sure that you pass all 5 tests before attempting to fix any memory leaks. If anything causes the program to crash (or if the pass-off script is unable to finish testing your code) the pass-off script may terminate before it is able to delete your LinkedList, which will always result in memory leaks.

byu-cs235-lab6's People

Contributors

jacoba1100254352 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.