Java Bootcamp

This project is designed to practice key Java skills and report writing, and to familiarize yourself with important course processes. As in most projects in this course, you will be submitting code and a written report. Unlike most projects, the code and report are relatively separate for this particular project, and you have multiple choice and short answer questions to fill out.

There are 3 main components: Task 1: Java Exercises, Task 2: Java and Process Homework Questions, Task 3: Report Writing Exercise

These exercises (with the exception of the report writing exercise and some quiz questions about process) are designed to give you practice with the most important aspects of Java that you will need to complete the projects in this course. In addition to attending class and lab sessions, we highly recommend reading through the W3Schools Java Tutorial. For now, you can focus on the material before Packages (excluding recursion), however we will cover many of these topics throughout the semester, so we encourage you to return to this as a resource as later sections become relevant.

If you are finding these exercises difficult, you are not alone and we want to help! We strongly encourage you to come to office hours (either mine or your lecture instructor's)! This is the time to address any questions you have about Java. Letting them wait will only make the rest of the semester more challenging. We are excited and happy to answer these questions and won't judge you for having them!

Please read the section on submitting your work before proceeding to these exercises.

Task 1: Java Exercises

To practice Java, you will download 2 skeleton Java files and fill them out by writing the Java code (and a few comments) described by the comments in the files. We strongly suggest working on the files in the order they're listed below. It's backwards because you're writing the tester after the code (in the future, write your tester first!) But for the purposes of this exercise, it makes the most sense.

  1. Rectangle class exercise
  2. Rectangle class tester exercise

Lab Checkpoint: Before leaving lab today, make sure to complete the lab checkpoint. To do this, go up to the front of the room and show your lab instructor that you have completed your Rectangle class, uploaded it to Gradescope, and verified that you get full credit (5/5 points) from the autograder.

You must submit your code in the correct format to get credit for this (and future) assignments. See these instructions for how to do this. Please ask any of the course staff for help if you do not understand how to submit your project code!

By the time you submit your project on Wednesday night, you should submit both completed .java files. We will evaluate Rectangle.java using your Gradescope autograder score, and Tester.java by running it on your Rectangle class and making sure it gives the correct result (the correct result is specified in the comments).

Please also pay attention to the code-style exercises including writing file headers and comments! We will evaluate these as part of the project grading. You can expect a portion of the project grade to be devoted to code style for every project in this course. Following these exercises will give you clear guidelines for what we expect to see for this!

Task 2: Java and Process Homework Questions

The second component of this project is to correctly complete the "Lab 0 - Java and processes homework" on Gradescope. This is a series of multiple choice and short answer questions about Java (20 questions) and about course process (10 questions). They shouldn't be hard to answer and are instead designed to draw your attention to key pieces of information that we want you to know. For the Java questions, please consult the W3Schools Java Tutorial. For the course process, take a look through this website. You can also always ask any of the course staff for help! Note that future projects will not include multiple choice and short answer questions (it's a percularity of project 0).

When grading this, we will directly use your Gradescope score, so make sure to answer questions correctly! That being said, you can ask course staff about any questions you are uncertain about. We really just want you to learn these key pieces of information.

Task 3: Report Writing Exercise

In this exercise, you will practice writing a complete project report based on the Hypothetical Project Description given below. This is a model for how to write reports for all of your future assignments.

You should NOT write your report based on the Rectangle code! Instead, write it based on the Hypothetical Project Description supplied below.

First, read the sample project report provided here to understand what project reports in this course should look like. Please let the course staff know if you have any questions about this report format.

Second, read the Hypothetical Project Description included below and use it to write a project report in the style we have asked for. You can fill in your report in this template (go to file -> make a copy). Save it as a PDF and submit it inside your p0 folder when you submit the assignment.

Hypothetical Project Description

You wrote code to simulate 3 different strategies for managing a grocery store checkout line. In the first strategy (S1), each register has its own line, and people choose which line to wait in as they arrive. In the second strategy (S2), people wait in a single line, and each time a register is open the next person in line advances to it. In the third strategy (S3), there are 2 lines, each of which functions like S1 for half of the cash registers.

Your code uses Java ArrayLists instead of Java Arrays because ArrayLists can change size dynamically rather than always being a fixed size like an Array.

You measure 2 metrics in your experiment: the average waiting time for each person–ideally this is as small as possible), and the size of the largest line–ideally this isn’t too large so it doesn’t extend too far into the aisles.

You have the following results of your experiments printed to your terminal:
Average wait time:
S1: 2.1 minutes
S2: 5.9 minutes
S3: 2.5 minutes
Maximum line size:
S1: 20
S2: 7
S3: 10

Project Submission Checklist

This project is less cohesive than future ones, so please take a look at the checklist below to make sure you have done everything: