Skip to Main Content

Data Structures

Computer Science Department

Data Structures FAQ

 If anything is unclear, don’t hesitate to drop by office hours or post a question on our Piazza forum. Find instructors office hours by clicking the Staff link from the course website.

-RUCats has 80 hours of tutoring available online and in-person. Check the tutoring tab in Canvas!
-Instructors and Lead TAs have a combined 10 hours of Office Hours, open to all sections. See times/locations here.
-Piazza (found in the Canvas sidebar) provides fast support from Course Staff and other Students. Be sure to search to see if someone has asked a similar question!
-If you need a computer to complete work on, iLab machines can be found in the CSL (Hill 252) and surrounding rooms.

Don’t be afraid to ask for help, we are happy to. CS112 is meant to help you learn and grow to become better Computer Scientists and programmers. This is a safe space to fail and learn from failure, take advantage of that while you can.

Programming Assignment FAQ

You will need the Java Development Kit, an editor to write Java code, and extensions to add helpful features. Install all of the following links, in this order.

You will also need to install Java 17. Visit this page, and select Java 17 and which Operating System you are on. Then download an installer for Java 17 and run it.

Visual Studio Code is a text editor we use in CS112 to write Java code, install it from here.

Once you install Java 17 and VSCode, you can type “java -version” in the terminal, which should show you the version installed. If you get an error, but did download AND run the JDK, try restarting VSCode.

You should also install the following VSCode extension packs for Java, either through your web browser or the “Extensions” tab in VSCode.

Terminal / Command line. The terminal is a text interface to interact with the computer, it is already part of VScode. It’s a program that takes in commands, which it passes on to the computer’s operating system to run.

From the command line, you can navigate through files and folders on your computer, just as you would with a file graphic navigation interface like Windows’ File Explorer or Mac Os’ Finder. Here is a list of commands.

Some Useful Commands Are:

  • “pwd” aka Print Working Directory, which prints the file path of the folder which the terminal is currently in. While the terminal is inside a folder, it only has direct access to the files in that folder. To access files outside, you must either move the current working directory (next command) or specify the exact path.
  • “cd” aka Change Directory, which changes the current working directory of the terminal.
    • Note: Typing “.” represents the current working directory. So if there your current working directory is in a folder called “Test”, and inside that Test folder there is another folder called “Inner”, then you can navigate to that Inner folder with “cd ./Inner” or just “cd Inner”.
    • Note: To back out of a folder, into the folder which contains it, use “..” (i.e. to reverse the example above and go from Inner back to Test, do “cd ..”)
  • “ls” aka List, which lists all the files and folders in the current working directory.
  • You can also compile and run java programs with arguments through the command line. See any specific programming assignment for more info.

These commands are useful, as you will need to be in the main project folder for assignments to compile and run via the terminal. The main project folder is the one which directly contains the “src” folder as well as input files.

  • For assignments to run via the VSCode run button, you will also need to be in the main project folder. However, the terminal does not control the VSCode working directory (it only controls the terminals working directory). Instead, ensure you open the main project folder with File -> Open Folder.

Short videos on how to use basic command line commands:

Writing your first Java program. How to video on how to use VScode and the command line.

Read the OOP Review for a rundown on Object Oriented Java programming.

Try it! Open a New Folder in VSCode, and create a new Java file named “HelloWorld.java”. This should automatically create a “public class HelloWorld { }” class header. Inside the brackets, you can then create methods and class attributes.

Write a method with the header “public static void main(String[] args) { }”, this is referred to as the main method. This method’s code is what is actually ran when you run your java file directly, either through vscode or the command line.

  • The Drivers from your programming assignments use main() to start the Display and test cases.

Then inside the body of your main method, write “System.out.println(“Hello World!”);

When saved, compiled, and ran, this should now print “Hello World!” to your Teminal.

How do I approach a programming assignment? We suggest the following steps to complete your programming assignments successfully:

  1. Spend some time thinking about the problem. Remember that the computer is really stupid and requires very specific and incremental steps to solve a problem. Think about the inputs and outputs to your algorithm, as well as possible errors you may encounter. Use psedocode to write test algorithms
  2. Think about how you can test your code as you write it. As you write methods and implement algorithms, you should be confirming that it functions as you expect. This helps you to narrow down the amount of areas which you have to debug later on. See the Debugging and Testing Page for more.
  3. Unzip the files we provide, and start coding your algorithm into the appropriate file. A good practice is to compile your program often to catch syntax errors sooner rather than later and ending up with a huge number of errors. If your program has compiling errors, always fix the first one and compile again. Often fixing the first one will remove the remaining errors.
  4. DO NOT IGNORE any red lines (errors) in VSCode. These will prevent your program from running. When you hover over these, they will tell you what the issue is. It is important to be able to understand these error messages and determine the cause, and fix them. Often, it is a very simple fix, or a misunderstanding of the code which causes them.
  5. Once you compile successfully, run your test cases and evaluate your output.
  6. Come to office hours for help, or ask questions on Piazza. Piazza’s link is on Canvas sidebar.
  7. When fully satisfied with your results and test cases submit your assignment.
  8. Read the Hints given by autolab, and try to determine the cause of any errors. Use more custom tests with edge cases to try and find tiny issues in your program.

How can I extract the .zip file associated with an assignment? All files related to an assignment are bundled together in a .zip file, which you will need to extract:

  • Zip files on MacOS. Download the .zip file listed on the assignment page. In Finder, view the directory containing the downloaded .zip file. Some browsers will automatically unzip the .zip file and create a project folder — which will have the same name without the .zip extension — containing the individual files. (Some browsers may also delete the original .zip file.) Otherwise, if you see the .zip file but no project folder, double-click the .zip file to create the project folder. You will want to create the .java files in this project folder.
  • Zip files on Windows. Download the .zip file listed on the assignment page. In File Explorer, view the directory containing the downloaded .zip file. Right-click on the .zip file and select Extract All…, which will ask you to choose the extraction location. This creates a new project folder — which will have the same name without the .zip extension — containing the individual files.. (Do not double click the .zip file—that browses the contents instead of extracting them.)

Submitting Programming Assignments

All Programming Assignments can be downloaded from and submitted to AutoLab.

What is Autolab? It is an automated web grading system that grades and provides feedback for every assignment submission. For each problem, your code will be tested using a suite of test cases, and you will receive credit for each case on which your code performs correctly. AutoLab will give you feedback based on your submitted program, which you can then update and submit again for grading.

  • video on submitting your programming assignment.
  • video on viewing a programming assignment submission and its hints.

 No, all programming assignments submissions must be done on Autolab.

Corresponding Canvas assignments for each Programming Assignment are simply meant to be reminders about release/due dates. The assignments are submitted to/downloaded from AutoLab.

Submit the correct .java file or .zip folder to AutoLab, with the name either unedited, or named according to the assignment description.

Do not add any import statements, unless explicitly allowed in the instructions. Do not modify package statements, method stubs, fields, etc..

Make sure your code compiles before submitting. Test your code using JUnit or the Java Debugger.

 Yes, on most assignments you can submit up to 3 times without penalty. We deduct 5% of the your earned assignment points for each submission thereafter. Autolab uses only the LATEST submission for the assignment grade.

Do not use Autolab as a debugging tool. Make note of the test cases you failed, and manually check them. Write JUnit cases to check those values, so you can run the same tests on your own machine.

After submitting an assignment, the autograder will process it. It will then display a Green, Yellow, or Red light next to your submission.

The light system is just one part of the feedback, you can click for more information on the test cases you specifically failed. Make sure you read the hints associated with each submission.

Here is how to interpret the lights:

  • red means that either your program didn’t compile or it passed very few of our test cases (0 – 20% of points);
  • yellow means that your program passed some test cases (21 – 80% of points);
  • green means that your program passed most of our test cases (81 – 100% of points).

 It depends on the number of student submission requests, we strive for a few seconds but if the system is busy it may take up to 1 day before it gets to your submission request and give you feedback. If the deadline passes while you are waiting, your assignment will not be accepted. In other words, if you try to hand in your work close to the end of the deadline, you may be too late and your assignment will not be graded. Plan to submit your work with at least one day in advance.

General Course Questions

CS112 is a coordinated course, meaning that all Professors teach the same content, and all students complete the same assignments, labs, and exams.

You can see the CS112 Team on the Staff page.

If you have a question about a programming assignment, an autolab submission, or the autograder said “Contact an instructor!”, then post a question on our Piazza forum.

If you have an administrative concern with the course, personal issue, need something related to the course, want to reach the coordinators then email our course email.

We cannot grant SPNs for the course. These must be requested through and processed by the CS Department and cannot be overriden by us.

If you received an SPN during or at the end of add/drop, don’t worry! The first assignment releases at the end of add/drop and is due afterwards. We give more than enough time to complete assignments if you start early.

If registered, you will be added to the course Canvas a few days before the semester. You can then join Piazza through the sidebar. When the first programming assignment releases, will gain access to Autolab. You can also access your Gradescope account through the Canvas sidebar, this is where your written Exam grades will be posted.

The textbook is listed on the course syllabus, and free course video can be accessed with the listed code as well.