Computer Science 210
Data Structures
Fall 2017, Siena College
This relatively short lab will introduce you to the idea of the linked list, a recursive data structure.
You will be assigned a partner for this lab.
Getting Set Up
You will receive an email with the link to follow to set up your GitHub repository listintro-lab-yourgitname for this Lab. One member of the group should follow the link to set up the repository on GitHub, then that person should email the instructor with the other group members' GitHub usernames so they can be granted access. This will allow all members of the group to clone the repository and commit and push changes to the origin on GitHub. At least one group member should make a clone of the repository to begin work.
Please answer lab questions in the README.md file in your group's GitHub repository.
A Recursive Data Structure
Before getting started on the lab tasks, we will look at the RatioListApplet code a bit, which is also in your repository.
Memory Diagram
Consider this main method that uses the RatioList and Ratio classes from the RatioListApplet example.
public static void main(String args[]) { RatioList rats = new RatioList(new Ratio(7, 9), null); rats = new RatioList(new Ratio(3, 4), rats); rats = new RatioList(new Ratio(1, 10), rats); Ratio theSum = rats.getSum(); System.out.println(theSum); }
Extending the RatioList
The extensions to RatioList will be graded as practice programs. But only if the names of all group members is placed in the comment at the top of RatioList.java!
Submitting
Your submission requires that all required deliverables are committed and pushed to the master for your repository's origin on GitHub. That's it! If you see everything you intend to submit when you visit your repository's page on GitHub, you're set.
Grading
This assignment is worth 35 points, which are distributed as follows:
> Feature | Value | Score |
Q1: RatioList memory diagram | 10 | |
RatioList size correctness | 4 | |
RatioList addToEnd correctness | 7 | |
RatioList main with test cases | 4 | |
Q2: how to make a generic list | 10 | |
Total | 35 | |