Homework 1: Welcome to Java
Due September 9 @ 8:00pm on Autolab
This assignment will help you refresh your programming abilities and get you a basic introduction to Java. You should start early so that you can attend office hours when problems come up.
Introduction
In this assignment you will be creating a basic class that wraps an array and provides useful methods for interacting with it. Download a pre-prepared Eclipse Project hw1.zip
and import it into Eclipse using these instructions. You will make all of your changes inside of MyArray.java
.
MyArray
Inside the file MyArray.java
you will find 10 method declarations with empty bodies. You need to implement each incomplete method and write code to test them inside in the main method. There are comments inside the file to help you understand what the methods are supposed to do.
You are free to add new methods to the file (such as helper methods), but do not change the names of any of the provided methods. If you do, you will automatically fail the autograder.
Grading and Submission
There are two parts of the grading of this assignment:
- For the first 90 points, your submission will be auto-graded on Autolab.
- For the next 5 points, your submission will be manually graded to check for good implementation methodologies. (Did you use a good approach to solving the problems?)
- For the next 5 points, your submission will be manually graded to check for good testcases that you include in the main method. (Do you have 2-3 basic testcases for each method, and do they all execute automatically?) There is one testcase already included to serve as an example.
- Your code will also be checked for style. The parts of style that can be checked automatically (things like spacing, indentation, the use of CamelCase, etc.) are automatically checked by the autograder. Other parts of style, such as choosing good variable names, will be checked manually. Autograded style guide violations can result in, at most, -10 points. Manually checked style guide violations can result in, at most, -5 points.
You will submit your program to Autolab. Login to the system and you will see homework 1.
Once there, you need to submit a zip
file containing your code. Luck for you, however, Eclipse can create this zip file for you. Check out these instructions for exporting. On Autolab, you’ll submit that exported zip
file. On the page that follows your submission you will see your live score (out of 90). It may take up to a few minutes for your score to appear; during that time just hit refresh in your browser. If you receive a lower score than you expect, you can click on the score to see the feedback from the autograder.
For this assignment you have 15 submissions. That should be more than enough. (Especially if you write your own testcases while you work…)
Restrictions
You may only use the following Java libraries in this assignment:
java.util.Random
Important Notes
- If you have questions, please post to Piazza. The course staff, including the instructor, monitor and answer questions there.
- When posting to Piazza, if you include any code make sure your question is posted privately to the instructors, and not to the entire class.
- Do not change the names of any of the provided methods.
- After you submit to Autolab, make sure you check your score. If you aren’t sure how to do this, then ask.
- There is no partial credit on Autolab testcases. Your Autolab score is your Autolab score.
- Read the last bullet point again. Seriously, we won’t go back later and increase your Autolab score for any reason. Even if you worked really hard and it was only a minor error…
- You can submit to Autolab multiple times. So, after you submit you should check your score. If it isn’t a 90 you can keep working until it is.
- Don’t forget to make sure your code conforms to the style guide. We’ll be taking a look at that!
- The style guide has a bunch of small rules with regards to indentation and spacing that are hard to follow perfectly. Luckily, Eclipse can handle it for you! Go to
Source -> Format
in Eclipse and watch all of your spacing and indentation problems get fixed automatically. (You should do this before every submission to Autolab.) - Don’t forget to write your own testcases in the
main
method. We’ll be taking a look at those!