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. Lab exercise
  2. Rectangle class exercise
  3. Rectangle class tester exercise

Lab Checkpoint: Before leaving lab today, make sure to complete the lab checkpoint! For this week, that means running Lab0.java and showing us that your code passes the checkpoints for the first 2 sections. Call us over by putting the green notecard on your desk once you've completed this and we'll give you credit for the lab!

When you submit your project on Sunday night, you'll submit all 3 of these files. We will evaluate them by: 1) checking that your output in the lab exercise matches the expected output that is provided in the file, and 2) 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 should write this report in the Project Report Template document in the Google Classroom folder associated with this project. 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 -- Java Concepts and Course Processes

The final component of this project is answer the following reflection questions in the Reflection section of your project report. Some questions pertain to Java and some to course processes. Please take both of them seriously! Please remember to number them in your report so we know which question you are answering! Your answers should all be 1-2 sentences.

  1. What is the difference between defining and initializing a variable?
  2. What does overloading a method mean?
  3. What are access modifiers and how should you use them?
  4. What is the difference between a static and non-static method?
  5. It's Wednesday at 8 PM and you're still working on project 3. You have used 1 late submission day so far. What should you do?
  6. It's Sunday at 8 PM and you're still working on project 7. You have used 4 late submission days so far. What should you do? What if instead you have already used 10 late submission days?
  7. You're going to be out of town on Monday afternoon--your usual lab period. What should you do to make sure you get credit for the lab work?
  8. 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.