Skip to content

Commit

Permalink
change to array-based-list assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
jjfiv committed Mar 10, 2020
1 parent 3f396be commit 2a30eeb
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1,032 deletions.
32 changes: 10 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# CSC212Lists
List Data Structures via Testing
# CSC212ArrayLists
Array-based List Data Structures via Testing

### ListADT Methods to implement

Expand Down Expand Up @@ -53,49 +53,37 @@ This assignment is purely graded on test accuracy.
Right now, when I run all the tests in this project, I get the following output:

```
Tests run: 142, Failures: 0, Errors: 108, Skipped: 0
Tests run: 82, Failures: 0, Errors: 57, Skipped: 0
```

So there are 34 passing tests, and 108 failing tests.
So there are 25 passing tests, and 57 failing tests.

Your score on this assignment will range up to 100% -- the fraction of the tests that pass on your code (minus the tests that already pass), provided:

1. there are no code compilation problems with your code (red lines or Problems in Eclipse).
2. you do not rename any methods or modify the tests in any way, and
3. you resolve any infinite loops in your code (better to comment out that method and have it crash than run forever -- it prevents other tests from running.

Every test is a little less than 2 points of your grade.

## What should I do first?

There are TODOErr methods in:

Start with ``FixedSizeList``.
- (6) ``src/main/java/edu/smith/cs/csc212/adtr/real/FixedSizeList.java``
- ``src/main/java/edu/smith/cs/csc212/adtr/real/FixedSizeList.java``
- The challenges here are removeIndex (need to slide elements to the left) and addIndex (need to slide elements to the right).
- The one we discussed in class is easier, start there.

Then, work to complete ``GrowableList`` which is an ArrayList implementation based on ``FixedSizeList`` (literally most of the methods are exactly the same) but it needs a resizeArray method to be completed.
- (4) ``src/main/java/edu/smith/cs/csc212/adtr/real/GrowableList.java``
- ``src/main/java/edu/smith/cs/csc212/adtr/real/GrowableList.java``
- Start with copying over methods from ``FixedSizeList`` which are exactly the same...

Then, work on ``SinglyLinkedList``: This will be very hard if you do not draw pictures.
- (9) ``src/main/java/edu/smith/cs/csc212/adtr/real/SinglyLinkedList.java``
- Start with everything that has the word ``Front`` in it.
- ``getIndex`` and ``setIndex`` are a lot like ``size``.
- ``Front`` is easier than ``Back`` which is easier than ``Index``.
- ``get`` is easier than ``add`` which is easier than ``remove``, usually.

Then, work on ``DoublyLinkedList``: Some methods will be just like SinglyLinkedList (e.g., front methods) and some will be very different.
- (12) ``src/main/java/edu/smith/cs/csc212/adtr/real/DoublyLinkedList.java``
- ``*Front`` and ``*Back`` have symmetry.
- Again, ``getIndex`` and ``setIndex`` are like size.
- Do all the front/back methods before doing any index methods here.

Then, work on ``ChunkyArrayList``: This data structure is very different from the others, because it uses GrowableList and FixedSizeList to make another.
- (9) ``src/main/java/edu/smith/cs/csc212/adtr/real/ChunkyArrayList.java``
- ``src/main/java/edu/smith/cs/csc212/adtr/real/ChunkyArrayList.java``
- This is a totally different, challenge data structure.
- It doesn't have nodes. It doesn't use ``ArrayWrapper`` directly. It uses ``GrowableList`` and ``FixedSizeList``.
- It doesn't use ``ArrayWrapper`` directly. It uses ``GrowableList`` and ``FixedSizeList``.
- Don't let it have any empty "chunks" in the middle.
- When you delete the last item from a chunk, delete the rest of the chunk.



2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>com.github.jjfiv</groupId>
<artifactId>CSC212ADT</artifactId>
<version>1.1</version>
<version>1.3</version>
</dependency>

</dependencies>
Expand Down
128 changes: 0 additions & 128 deletions src/main/java/edu/smith/cs/csc212/lists/DoublyLinkedList.java

This file was deleted.

124 changes: 0 additions & 124 deletions src/main/java/edu/smith/cs/csc212/lists/SinglyLinkedList.java

This file was deleted.

Loading

0 comments on commit 2a30eeb

Please sign in to comment.