Skip to main content

CIS 163

Campground Reservations

Summer 2020

GitHub Classroom URL: classroom.github.com/g/yf0mvbdr

Objectives:

Preliminaries:

Before beginning this project:

Milestones:

Problem Statement:

Your first task as a new programmer in a company will typically be modifying existing code. With that in mind, your assignment is to update a provided Reservation System program to use a Linked List (in addition to some other new functionality). You my not add any additional instance variables to the classes provided without the instructor’s permission.

Important:

Step 0: Get Oriented

Examine the starter code and figure out how it works. Use the debugger, if necessary. Be patient: This could take an hour or two.

Step 1: Replace ArrayList with MySingleWithTailLinkedList

In ListModel, change all occurrences of ArrayList to MySingleWithTailLinkedList. Once you have made this change, you will not see syntax errors (because the two classes have identical interfaces with respect to this project); however, you program will not function again until you complete steps 2, and 3. From this point on, you are not permitted to change the ListModel class.

Step 2: Complete MySingleWithTailLinkedList

Complete MySingleWithTailLinkedList methods get, remove, and add. Use private helper methods where appropriate. Do not modify any of the other methods in MySingleWithTailLinkedList. You may not add any additional instance variables to the classes provided (Node, MySingleWithTailLinkedList, etc.). You are not permitted to change either the GUI or the ListModel class.

We suggest you complete the methods in this order: get, remove, add. For now, the add method can place the new item anywhere in the list.

Note: The GUI will not run correctly unless all three methods are working perfectly. If the GUI doesn't seem to be working, you have an issue with one or more of the linked list methods. You will likely need to use the debugger to get everything working.

Step 3: Add elements in order

Modify the add method so that items are inserted in sorted order. Items should be sorted as follows:

Grading Rubric

CategoryPoints
Coding style10
get10
remove20
"basic" add10
add with insert30
Timeliness20

Note: Points will be deducted for insufficient testing.

Timeliness is based on when your code passes both the automated tests and my inspection:

DayPoints
Two days early22
One day early21
On time20
Late-3 points per day

Submitting your Project

To submit your project:

  1. Make sure your name(s) appears in a comment at the top of each .java file.
  2. Clean up your code (check for proper indention, long lines, etc.)
  3. Commit/push with "[Grade me]" in the commit message.

Updated Wednesday, 1 July 2020, 1:19 PM

W3c Validation