CSc 301 Lab Activities


Lab 1

Complete the Following Directions Data Form (handout) while completing the Following Directions Exercise (handout).  Show your completed work to the instructor who will verify your solution.  Place the completed forms in your course binder.


Lab 2


Ergonomics Review.

Create BlueJ launcher.

Similarly, create a launcher for Lines of Code Counter.
Command:   java -jar /home/graderjd/bin/JavaLOC.jar
Icon: /home/graderjd/bin/loc-icon.png

If you have never used BlueJ, you might watch a fast 1 minute YouTube video (without audio) showing how to create HelloWorld using BlueJ.  At your convenience you should also read (or at least skim) the complete BlueJ Tutorial (PDF).

Read this short description of how Compile Logger extension works.

Practice using BlueJ and the Compile Logger extension.

  1.     Create a new class (in a new project) and compile it.
  2.     Invent a simple segment of Java code containing a syntax error and compile it.
  3.     Correct the syntax error and compile it.
  4.     Add a new statement and compile it.
  5.     Exit BlueJ.
  6.     Find the compile log and see if it accurately logged the actions above.


Practice using LOC counter to determine the size of a program.

  1. Launch the LOC counter using the launcher your created above.
  2. Click "Choose File" and select the source code file you created in the BlueJ practice above.
  3. Manually count the number of logical statements in your program and see if it matches the LOC results.
  4. Add several blank lines and several lines with comments to the source file, and rerun the LOC count to verify that the result is unchanged.
  5. Add a new statement to the program broken across several lines, for example
  6.    int total = 7
  7.                        * 8 - 3 + (
  8.                                     21 - number ) ;
  9. Rerun the LOC counter to observe the effect this has on the result.

There is nothing to submit for this lab activity.

Lab 3

Create a launcher for the Compile Log Summary script.

    Command:   xterm -hold -e /home/graderjd/bin/compilelogsummary

    Icon: /home/graderjd/bin/logsummary-icon.png

Delete the Compile Log file:  rm .bluej/bluej-compilelog.txt

Follow the directions in the JUnit and Web-CAT lab.

When Web-CAT gives you a perfect score, you are finished.

Exit BlueJ.

Launch the Compile Log Summary script and observe the results. (You don't need to record anything).

There is nothing to submit for this lab activity.


Lab 4

Introduction to Minimalist Process Script.

Instructor hands out Minimalist Process Form and Instructions.

Instructor reads through Minimalist Process Script online.

Instructor reads through Form Instructions referring to "Fred" example.

Volunteer works calculations for example "Laura" on transparency, other students verify.

Instructor hands out scenario ("Joe").

Students complete form for scenario, all discuss solution.

Instructor follows the script for sample program (SumOfInts) while students individually record data in form about instructor's performance.  Instructor takes picture of a volunteer solution and all discuss.

For next time, create divider tabs for binder:  Forms, Exercises, Labs, Projects, Reports.

Forms - Process scripts and instructions, supply of blank forms.

Homework  - Completed homework assignments

Labs - all lab exercises, programs and data.

Projects - programming projects and data.

Reports - PSP0 summary report and Final PSP report. Self-improvement project report.

Do NOT put lecture notes in your binder.



Lab 5

Follow the Minimalist Process Script as you complete lab programming problem L1

Place all your test data in a text file. 

Execute your program using the data in the file redirected as standard input.

Redirect the output from your program to a text file.

Printout your source code, the input data file, and the output.

Show your completed form and printouts to the instructor.

Start a new compile log when you begin each programming problem.  Place the artifacts in your binder under the "Labs" tab in chronological order (L1, L2, L3, ...).  Staple the work for each program in this order:  data form, source code, input data, execution output.

'lpr' is not fixed yet, so save results to a file and print from gedit.

Guidelines: 


Lab 6

Complete this lab using CentOS on a CSL lab workstation.  Finish the problem you were working on during the previous lab.  Then complete the next sequential programming problem (L1, L2, L3, ...) using the Minimalist Process Script.   Start a new compile log when you begin.  Fill out the Minimalist Process Form according to the instructions. 

Before the next class meeting, enter the data from all your Minimalist Process Forms into this web form:

http://spreadsheets.google.com/viewform?formkey=dHF3cVdIa3JJd2VzZmx5aV9RSjRpZEE6MQ

Bring the most recent Form to submit at the next class meeting.


Lab 7

Complete Time Log Exercise 1 (handout). 

Complete Time Log Scenario 2.

Complete Time Log Scenario 3.

Complete Time Log Scenario 4.


Lab 8

Use the Time Log data from Lab 7:

Complete Defect Tally and Project Summary for Scenario 2.

Complete Defect Tally and Project Summary for Scenario 3.

Complete Defect Tally and Project Summary for Scenario 4.

 Notes:  If the scenario doesn't provide something required by a form (e.g., Date), leave the field blank.  Similarly, the scenario may not provide enough description to adequately categorize or describe every defect - don't worry about the accuracy of the "type" or "description" fields.


Lab 9

Using the PSP0 script, start solving the next lab programming problem ("Ln").  Use the PSP0 Design Form for recording your design work.  When you complete the design, show the form and your time log to the instructor.

Continue development work.  If you are unable to finish the problem during lab, you must complete it after lab before the next class meeting.  Bring your completed forms to class.


Lab 10

Continue using the PSP0 script to solve the next lab programming problem ("Ln").  Use the PSP0 Design Form for recording your design work.  If you are unable to finish the problem during lab, you must complete it after lab before the next class meeting.  Bring your completed forms to class.


Lab 11

Practice with PSP1 data forms - handout during lab (Bilbo).


Lab 12


Practice with PSP1 data forms.
Watch the video and complete a Time Log, Defect Tally, and PSP 1 Summary Form.
Kaylene Scenario (Historical Data) (Part1) (Part2)


Lab 13

Using the PSP1 script, start solving the next lab programming problem ("Ln").  Use your previous lab data for making resource estimates.

Use the PSP Design Form for recording your design work.  Continue development work. If you are unable to finish the problem during lab, you may complete it outside of class.  Bring your completed forms to next Monday's class meeting.


Lab 14

Complete the TimeLogger lab.

Now you may begin project 4.  You may track your time using TimeLogger and submit a printout from the tool instead of a handwritten Time Log. Use the project 3 Summary Report data as the historical data for your resource estimates.


Lab 15

Download and install the Code Coverage extension for BlueJ.
Write a JUnit test for the Scorer class of the Bowling score problem.
Put your name in an @author tag in the class header.

Start Coverage, Run Tests, End Coverage and examine the results.
The goal is 10/10 branch coverage and 25/25 line coverage.

Take a screen capture when you achieve this goal. (View example).
Print the source to your JUnit test and the screen capture.
Submit at the next class meeting.


Lab 16

Complete the quality measures practice worksheet (pdf) and the Yield exercise (handout).  After everyone has finished the solutions will be presented in lab.


Lab 17

Complete the two exercises on handouts:  Using Quality Data and Quality Management. After everyone has finished the solutions will be presented in lab.


Lab 18

Code Review Practice Lab

Read the Program Requirements.

Download the source code (94 LOC) for the solution. 

Make a printout of source code that INCLUDES LINE NUMBERS.  There are several ways to accomplish this, including the "-n" flag of the unix "cat" command.

Obtain Time Log, Defect Tally and Checklist forms.

Follow Code Review Script, except don't correct the mistakes, just record them on the defect tally.

Submit time log, defect tally, completed checklist at the next class meeting.


Lab 19

More code review practice.

Submit time log, defect tally, and non-defect log when complete or at next class meeting.


Lab 20

Use the PSP2 script to solve the next lab programming problem ("Ln").  When you finish the CODE phase, print out the line numbered source code you will use for the code review and show it to the instructor.  If you are unable to finish the problem during lab, you must complete it after lab before the next class meeting.  Bring your completed forms to class.  Do not start Project 6 until your lab work has been approved.


Lab 21

Begin working on Project 6 using PSP2.   There is nothing to submit for this lab, but see homework 11.


Lab 22

Complete the PSP2 Summary Form using the P5 data handout for "Chris".


Extra Credit

Task: create an assignment to give other CSc 301 students practice completing the PSP2 Project Summary form, especially the yield and A/F ratio calculations.

Invent some hypothetical but realistic data for projects 5 and 6.

Complete a PSP1 Project Summary form for Project 5.

Complete a Time Log for Project 6 (Don't need start/stop times.)

Complete a Defect Tally for Project 6 (Don't need type and description fields.)

Complete a Size estimate for Project 6.

Complete the "answer key": a finished PSP2 Project Summary form.

Staple the forms together in the order listed above and submit at the next class meeting.


Lab 23

You must have ALL your previous project data available before you can complete this lab.

The instructor will provide the URL for his Summary Form History spreadsheet.  Download it and save to your local filesystem.  (DO NOT open it directly ... save it first then open it.)

The first page contains instructions.  Study the instructions carefully!

Enter PSP0 Summary Report data into the spreadsheet.

Enter PSP1 data into the spreadsheet.

Verify the summary results in spreadsheet match your hand calculations. If there is a discrepancy, diagnose whether the problem is in the spreadsheet or your calculations.

Print P5 Summary page cells B1 - F38 and submit to instructor.  (Assuming the printer is working).

Examine graphs on Analysis page.


Lab 24

Complete the Process Definition Critique (handout in class).  Submit at the end of lab.


Lab 25

Humphrey recommends we validate our newly defined enhancement to PSP2 that we wrote for Homework 13.  Follow your enhanced PSP2 process as you complete the next Ln programming problem.  Record all data and complete all forms.  Records all problems and improvement suggestions on PIP's.


Lab 26

Use the Zero Defect Challenge instructions to solve programming problem Z3


Lab 27

Binder assessment.  Work on Final PSP Report.