Preview

Info1105

Good Essays
Open Document
Open Document
951 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Info1105
INFO1105 Assignment 1: Racing Scoreboard
For this assignment, you will need to implement a linked list that maintains its elements in sorted order. For example, inserting , , (in that order) into a regular linked list would look like this: However, if the list maintained a sorted order, it would look like this:

A

A
A C

A

C
A B C

A

C

B

Now if we traverse the list from head to tail, we always get a sorted list.

1 Marking Guidelines
This assignment will count 8% towards your final mark for the course. It has two components: Component Weighting Requirements Automatic Testing 80% Pass all tests on PASTA 1. Commenting: Clear, sufficient comments (not excessive or with TODOs) 2. Layout: Consistent indentation that is easy to read Hand‐Marking 20% 3. Naming: Informative (and not too long) variable names 4. Efficiency: No unnecessary tasks performed For examples of well‐written code, see the solutions to previous tutorials

2 What you need to submit
For this assignment, you must submit EIGHT (8) files through PASTA: 1. 2. 3. 4.
LinkedListNode.java (and LinkedListNodeTest.java), an implementation of the Node ADT SortedLinkedList.java (and SortedLinkedListTest.java), an implementation of the LinkedList ADT Racer.java (and RacerTest.java), which is stored in your linked list and explained below Scoreboard.java (and ScoreboardTest.java), which uses your linked list and is explained below

You are NOT allowed to use any 3rd‐party libraries for this assignment. All code must be your own work. NOTE: You should write your own set of JUnit tests in the test files to ensure your 4 classes are working. Part of the assignment will be automatically marked, and you will only be allowed THREE (3) attempts in total. Each required file is covered in more detail below. A skeleton project has also been provided through eLearning.

2.1 Racer.java
Create a Racer class with the following structure:

You May Also Find These Documents Helpful

  • Good Essays

    Exercise 1: Review of array-based lists Create a project using the classes in the DocSharing area labeled “User-defined array list." Compile it, run it, and review the code that is given carefully. This code tests the ArrayList class provided in the lecture.…

    • 714 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Cse 373 Final Note

    • 955 Words
    • 4 Pages

    An ordered or sorted binary tree, is a node based binary tree data structure that has the following properties:…

    • 955 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    8. (TCO 1) The purpose of a sort in Access is to (Points : 4)…

    • 368 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    It 210

    • 2960 Words
    • 12 Pages

    After reading this chapter, you will be able to do the following: Declare and use one-dimensional arrays [Section 6.1] Manipulate parallel arrays [Section 6.1] Use the serial search technique to search an array for a specified element [Section 6.2] Use the bubble sort technique to sort an array into a specified order [Section 6.2] Use the binary search procedure for locating an item in an array [Section 6.3] Use the selection sort procedure for sorting an array [Section 6.3] Represent character strings as arrays [Section 6.4] Declare and use two-dimensional arrays [Section 6.5]…

    • 2960 Words
    • 12 Pages
    Powerful Essays
  • Good Essays

    ArrayList

    • 801 Words
    • 4 Pages

    Searches the entire sorted ArrayList for an element using the default comparer and returns the zero-based index of the element.…

    • 801 Words
    • 4 Pages
    Good Essays
  • Good Essays

    b) Binary tree that satisfies max-heap property. (7,10,3,11,5,4,1,2,1,0,8)Values inserted into tree in the order given and tree is reorganized every time an item is added.…

    • 606 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Kernel Data Structures

    • 3107 Words
    • 13 Pages

    The simplest data structure representing such a linked list might look similar to the following:…

    • 3107 Words
    • 13 Pages
    Good Essays
  • Better Essays

    The quest to develop the most memory efficient and the fastest sorting algorithm has become one of the great mathematical challenges of the last half century, resulting in many tried and tested algorithms available to the individual who needs to sort a list of data. In fact new sorting algorithms are still being developed today, take for example the Library sort, which was published in 2004.…

    • 1130 Words
    • 5 Pages
    Better Essays
  • Satisfactory Essays

    References: 2. M. R. Brown and R. E. Tarjan, "Design and Analysis of a Data Structure for Representing Sorted Lists," SIAM Journal on Computing 9 (1980), 594-614.…

    • 72871 Words
    • 292 Pages
    Satisfactory Essays
  • Good Essays

    In a directed graph, each edge is represented by a pair of ordered vertices i.e.…

    • 6746 Words
    • 46 Pages
    Good Essays
  • Satisfactory Essays

    IT106

    • 997 Words
    • 6 Pages

    We will also give discounts for bulk orders a discount when a person buys many of the same item…

    • 997 Words
    • 6 Pages
    Satisfactory Essays
  • Powerful Essays

    Linked List Basics

    • 8040 Words
    • 33 Pages

    Abstract This document introduces the basic structures and techniques for building linked lists with a mixture of explanations, drawings, sample code, and exercises. The material is useful if you want to understand linked lists or if you want to see a realistic, applied example of pointer-intensive code. A separate document, Linked List Problems (http://cslibrary.stanford.edu/105/), presents 18 practice problems covering a wide range of difficulty. Linked lists are useful to study for two reasons. Most obviously, linked lists are a data structure which you may want to use in real programs. Seeing the strengths and weaknesses of linked lists will give you an appreciation of the some of the time, space, and code issues which are useful to thinking about any data structures in general. Somewhat less obviously, linked lists are great way to learn about pointers. In fact, you may never use a linked list in a real program, but you are certain to use lots of pointers. Linked list problems are a nice combination of algorithms and pointer manipulation. Traditionally, linked lists have been the domain where beginning programmers get the practice to really understand pointers. Audience The article assumes a basic understanding of programming and pointers. The article uses C syntax for its examples where necessary, but the explanations avoid C specifics as much as possible — really the discussion is oriented towards the important concepts of pointer manipulation and linked list algorithms. Other Resources • Link List Problems (http://cslibrary.stanford.edu/105/) Lots of linked list problems, with explanations, answers, and drawings. The "problems" article is a companion to this "explanation" article. • Pointers and Memory (http://cslibrary.stanford.edu/102/) Explains all about how pointers and memory work. You need some understanding of pointers and memory before you can understand linked lists. •…

    • 8040 Words
    • 33 Pages
    Powerful Essays
  • Powerful Essays

    Data Structure Assignment

    • 4612 Words
    • 19 Pages

    References: * ^ a b Donald Knuth (1997). The Art of Computer Programming. 3: Sorting and Searching (3rd ed.). Addison-Wesley. pp. 396–408. ISBN 0-201-89685-0.…

    • 4612 Words
    • 19 Pages
    Powerful Essays
  • Better Essays

    Interview Ques

    • 24158 Words
    • 97 Pages

    Write a C program to insert nodes into a linked list in a sorted fashion…

    • 24158 Words
    • 97 Pages
    Better Essays
  • Powerful Essays

    The insertion sort works just like its name suggests - it inserts each item into its proper place in the final list. The simplest implementation of this requires two list structures - the source list and the list into which sorted items are inserted. To save memory, most implementations use an in-place sort that works by moving the current item past the already sorted items and repeatedly swapping it with the preceding item until it is in place.…

    • 3413 Words
    • 14 Pages
    Powerful Essays

Related Topics