In this assignment, you will practice your Java skills by implementing an ArrayStack and a ListQueue.
First, start by setting up your development environment if you haven't already. You may NOT use JGrasp – you MUST use a full-fledged integrated development environment (IDE). We recommend using Eclipse – installation and usage instructions can be found on the resources tab.
Here are direct links to the guides you should read:
If you have Eclipse installed already, please read through the installation guide anyways: you need to install a plugin and change a few of Eclipse's default settings.
Please also make sure you are using the latest version of Eclipse, which, as of time-of-writing, is Eclipse Oxygen. If you are not sure what version of Eclipse you're running, think back to when you installed it. If you installed Eclipse sometime within the past 6 months, you're probably ok. Otherwise, you should probably uninstall and re-install Eclipse just to be safe.
Download the project from Gitlab using the instructions here. Your personal repository should be located at https://gitlab.cs.washington.edu/cse373-18su-hw1/hw1-YOUR_NET_ID
Read through README.md. This file contains instructions for the assignment. A good place to read this file is on the Gitlab project page - it will nicely format the text and embed images.
Try running the JUnit tests. To run an individual test, right click on the
file in the Package Explorer and select "Run As > JUnit Test." To running
all of them, do the same to the entire package. If everything is set up
correctly, all of TestListStack.java
should pass.
Implement all Stack
Queue
Queue
ArrayStack.java
and ListQueue.java
.
All tests should pass when you are done.
Your ArrayStack
should automatically resize
its backing array by doubling when it runs out of room, and
halving when less than a quarter is utilized.
Do not modify the interface code!
Do not remove or change any existing tests. Part of your evaluation will be if these tests pass as they are currently written, so keeping them as-is is in your best interest. You may, however, add tests as you see fit to help you develop your implementation.
README.md has more details than this page. Consider it the canonical version of the assignment.
We will be using git to submit code in this class.
Follow the instructions in README.md
to commit and push
your code back to Gitlab. Tag your final submission with "SUBMIT."
If you do not have a commit tagged "SUBMIT", whatever is at the head
of your master branch at the due date will be considered your submission.