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.

There are 3 main components: Task 1: Java Exercises, Task 2: Report Writing Exercise, Task 3: Reflection Questions -- Java Concepts and Course Processes

Task 1: Java Exercises

To practice Java, you will download 3 skeleton Java files and fill them out by writing the Java code and comments described by the comments in the files. We strongly suggest working on the files in the order they're listed below.

  1. Rectangle class exercise
  2. Rectangle class tester exercise

Lab Checkpoint: Before leaving lab today, make sure to complete the lab checkpoint! For this week, that means running Tester.java and showing us that your output matches the desired format.

When you submit your project on Tuesday night, you'll submit both .java files. We will evaluate them by running our own version of the Rectangle class tester on your Rectangle class to make sure it produces the output we tell you to expect in the Tester.java file! Note that your tester should be identical to ours if you have done the exercise correctly, so there are no surprises!

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!

These exercises are designed to give you practice with the most important aspects of Java 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. This set of exercises focuses 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 them as they become relevant.

If you are finding these exercises difficult, we strongly encourage you to come to office hours! 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.

Task 2: Report Writing Exercise

In this exercise, you will practice writing a complete project report based on the hypothetical project description given below.

First, read the sample project report provided here to understand what project reports in this course should look like. We will do additional exercises during the lab period in the following weeks to better understand how to write abstracts and results sections, but for now, do your best to follow the format described in this document.

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 this report in this template (go to file -> make a copy). This is your own file to edit, and it will be submitted as part of your project when you submit the assignment.

You will fill in reflection questions as part of this report, however those are described in detail under task 3.

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

Task 3: Reflection Questions -- Course Processes

The final component of this project is answer the following reflection questions in the Reflection section of your project report. This week, the questions are just on course processes, but in the future they will be more explorative about the results of your project.

  1. It's Friday at 8 PM and you're still working on project 3. What should you do?
  2. It's Tuesday at 8 PM and you're still working on project 6. You have used 4 late submission days so far. What should you do?
  3. You're going to be out of town on your usual lab period. What should you do to make sure you get credit for the lab work?
  4. List at least 3 office hour slots for any of the instructors or the evening TAs that your weekly schedule will usually allow you to attend.