Computer Science 523
Advanced Programming
Summer 2014, The College of Saint Rose
In this week's lab, you will practice with ArrayLists and arrays.
You may work alone or with a partner on this lab. Only one submission per group is needed.
Getting Set Up
To get your BlueJ environment set up for this week's lab assignment, start BlueJ and choose "New Project" from the "Project" menu. Navigate to your folder for this course and choose the name "Lab4" (no spaces) for the project.
Create a document where you will record your answers to the lecture assignment and lab questions. If you use plain text, call it "lab4.txt". If it's a Word document, you can call it whatever you'd like, but when you submit, be sure you convert it to a PDF document "lab4.pdf" before you submit it.
Lecture Assignment Questions
We will usually discuss these questions at the start of class on the lab due date, so no credit can be earned for late submissions of lecture assignment questions.
Practice Programs
Programming Assignment: Enhancing the CourseGrades Example
Start by making your own copy of the CourseGrades example, and read through the existing code to make sure you understand how it all works. You will be making several enhancements to this program:
average Alice
would print
Alice has an average of 88.5.
Print the average with one digit after the decimal point.
If the student is not found, print an appropriate error message.
delete Bob
If the student is not found, print an appropriate error message.
The command
save somegrades.dat
would save all of the student and grade information to the file somegrades.dat, and the command
load somegrades.dat
would load in the file, replacing any data currently in the program, and
merge somegrades.dat
would load in the file, adding to any existing data currently in the program.
You may choose your own appropriate file format.
Submitting
Before 4:30 PM, Tuesday, June 17, 2014, submit your lab for grading. There are two things you need to do to complete the submission: (i) Copy your file with the answers to the lecture assignment and lab questions into your project directory. Be sure to use the correct file name. If you prepared your answers in Word, export to a PDF file and submit that. (ii) Upload a copy of your lab (a .7z or .zip file containing your project directory) using Submission Box under assignment "Lab4".
Grading
This assignment is worth 70 points, which are distributed as follows:
> Feature | Value | Score |
Lecture assignment questions | 14 | |
PhoneBook practice program | 6 | |
CourseGrades average command | 5 | |
CourseGrades delete command | 5 | |
CourseGrades save command | 5 | |
CourseGrades load command | 3 | |
CourseGrades merge command | 3 | |
CourseGrades stats command (basic) | 8 | |
CourseGrades stats command handles ties | 3 | |
CourseGrades updates to help command | 2 | |
CourseGrades comments | 5 | |
CourseGrades naming conventions | 2 | |
CourseGrades code organization | 2 | |
CourseGrades formatting | 1 | |
Lab questions | 6 | |
Total | 70 | |