HW 5: Homework Collection Program
Submit
One file : Collect.java will be collected.
Brief description
-
You are going to a write a program used to collect homework from a group of
students.
-
The homeworks are stored under students'
submit folder.
- When the program starts, the Professor will be prompted for
- The folder that contains students' folder.
- The folder to collect the homework.
- The name of the homwork
- The professor clicks collect button to collect the hw.
Examples :
Warning : this is just an example, you shouldn't assume
that there only 5 students in the class.
-
We have 5 students Amy, Ben, Charles, David, Eve.
-
Their login ID are
amy, ben, charles, david, eve respectively.
-
The students folders are under
pic20a/students folder.
-
Inside Amy's account. She had 2 folders under
amy folder, namely
submit and otherstuff
- The Professor said that he would collect a file named
hw.java
- Amy save her hw in
hw.java under the submit folder

Let's take a look from the Professor's view point.
-
The professor started the program. He was asked for the students' folder, the folder to collect the hw and the hw name.
-
The professor entered
pic20a/students for the students'
folder.
He also entered collect/hw1. All the homework will be collected in
this folder.
He entered hw.java for the file name.
- After he click the Collect button
- Amy's homework will be collected in
collect/hw1/amy/hw.java
- There was a
log.txt file under collect/hw1/. The log.txt file records the file that were collected.
Here is a sample log.txt

Sample Program
Test the program on your PC
Here are the steps to test my program.
Submission
Collect.java will be collected.
All source code submitted must contain the following information at the beginning of each file:
* Your full name.
* Your student ID number.
* Your PIC login ID.
* Your e-mail address.
* Your discussion section number and TA's name.
* The assignment number and description.
* Honesty pledge.
Properly formatted, this information should appear as follows:
/*
* Name: Charles Li
* Student ID: 000 000 000
* PIC ID: ccli
* E-mail: ccli@math.ucla.edu
* Assignment: hw1
*
* I, Charles Li, pledge that this is my own independent work, which
* conforms to the guidelines of academic honesty as described in the course
* syllabus.
*
*/
Solution
Collect.java