Programming Assignment 6 – Programming Workflow

Due Tuesday November 9 10:00pm Pacific Time

PA6 – Programming Workflow

This PA will give you an opportunity to reflect on how you work through programs.

Submission checklist:

Different assignments in this course have different collaboration policies. On this assignment, you cannnot collaborate with anyone. Your submission must be your own work and you cannot share or post code from your submission anywhere other than to hand in the assignment.

You can get a fresh repository with run and tester.jar here:

There are no checkoffs for PA6, though you are welcome to come for help.


  1. You only need to finish/submit 2 of the 4 tasks, and PA6 assignment on Gradescope is due on the same day as PA6-notes ().

  2. Q: In, is the number of values that we average over all the numbers passed as command line arguments or just the positive numbers?

    • A: We are only considering positive numbers. So for both the total and the count they should only be of the positive numbers.


Make a copy of this Google Doc. You will fill it in as you work.

Your task is to complete two of the following programs of your choice, and also complete a reflection while you are working.

When you’re ready to start programming, set a timer for 20 minutes – work on these tasks for that much time. Then, take a screenshot or copy/paste (a) your code and (b) the output of the most recent time you ran the program. It’s totally fine if running your code is producing errors at this point, the idea is just to take notes on progress.

Put that output into the Google Doc at the 20 minute mark, and write down a few sentences about your thought process at this point. Also note if you got distracted by another browser tab, your phone, etc during that 20 minutes. You don’t have to tell us how, just say yes/no and how many minutes you think you were distracted for.

When you work again, set another 20 minute timer and work for that time, then repeat taking notes. Then do this one more time, for a total of three 20 minute sessions each followed by note-taking.

If you don’t finish the task, still stop after the three sessions and put the notes for the reflection in place (it’s not expected that you must finish in 60 minutes, though you do have to finish, see below). If you finish early, note the time you finished.

The tasks, which you should complete two of, are here:


After you’re done with all three sessions (not necessarily the whole assignment), reflect on the following:

Some comments on this process: this may not be the ideal way for you to work. Sometimes I get a lot of “programming” done while walking my dog, and sometimes setting a problem down for a while and coming back to it is the best thing. You might be working on a day where other urgent obligations interrupt you every 5 minutes. Sometimes you may need to focus really hard for several hours to make any progress. So I don’t expect that you can or should always follow this process. However, doing it once might give you a useful scaffolding strategy, and it does help you understand how your time management and focus works while you’re programming, where you got stuck, etc. So for that reason I think this is a really useful exercise.

We are grading this on general completeness and effort; there’s no minimum or maximum word limit, or required format, or need to answer every question comprehensively. Complete the assignment in the spirit of reflection and learning about your programming workflow.


You must finish two of these programs as part of the assignment. There is an autograder you can use to check your work while the assignment is out. Come ask for help in tutor hours (help sessions) if you need help finishing them! We do ask that you spend at least one 30-minute session with notes before coming to help sessions on PA6, and we might ask to see your notes for a sense of your progress when you come.


Export your notes document as a PDF using Google Docs (under the File menu). You’ll hand it in under the PA6-notes assignment on Gradescope.

You’ll hand in the two .java files with your completed tasks to the PA6 assignment on Gradescope.

Challenges and Extra Practice

If you want more practice or an extra challenge, try writing the programs below. These are not for credit, but feel free to ask us about them on Piazza if you found them interesting!