2002年趨勢百萬程式競賽 (決賽題目)
| Functional Requirements |
|---|
New features have to be added to make the Good Neighbors application more powerful and complete. Listed below are all the feature requests collected from the market and customers. You are awarded points for each feature completed. However, you are not required to finish all the features to win the contest. The philosophy is "The more you complete, the more points you win". Final reminder: All features in the preliminary version should continue to work in the final version.
In the multiple level directory, each directory must be able to contain either a subdirectory or files. The subdirectory should function the same way as the directory. Users should be able to navigate through the directory hierarchy to access files and create other subdirectories. To fulfill that request, additional commands need to be added to Good Neighbors. They are:
| Function | Parameter | Example | Description |
|---|---|---|---|
| md <path> | path: The name of one directory to create. | md mydir | Creates a subdirectory |
| cd <path> | path: The directory to change to. | cd mydir
cd .. cd \ |
Displays or changes the remote working
directory
If no parameters are given, displays the current position in the remote global directory .. up a level \ go to root |
- System Log
Log support should be added so if anything goes wrong, users can easily find the error in the log file. The log should be a plain text file which records major system activities and any error warnings.
The log should include at least the following:
Time: Time stamp of the log, in YYYY/MM/DD HH:MM:SS format Type: INFO, WARNING, ERROR Details: Detailed information of this log.
Function Parameter Example Description log -d <filename> filename: the log file name 1. log -d history.txt 1. Saves all the system events and error messages into the designated file log -e <filename>
filename: the log file to ends. if file
name is omitted, ends all the active
log sessions.2. log -e history.txt
OR log -e
2. Ends the logging session
Audit Log:
The purpose of the audit log is to record file access activity, it should contain the following elements:
Date/Time: Time stamp of the log, in the format of YYYY/MM/DD HH:MM:SS File Name: Should be full file name, that is, full path + owner Activity: Record of user's access on this file, should at least include READ, WRITE, DELETE, ADD
Function Parameter Example Description log -a <filename> filename: sets the log file name 1. log -a access.txt Saves all access logs into the designated file
An access rights scheme needs to be introduced so users can set files for personal use only without publishing to the global list. By setting a file as private, only the owner can see this file in the directory. Other people can only see the files listed as public.
Function Parameter Example Description start <username> <password> username: user name password: user's password
start david password Starts the application. This function has to be called before all other functions can function properly. ls Displays the public/private status in the attributes
e.g.:
1.txt 2002/02/07 8:20am 5,236 jack public completeput -p <local_filename> put -y
<local_filename>-p: private -y: overwrite
local_filename: local file name
put -p private.doc
put -y myfile.doc
1. Upload a private file. 2. Upload and overwrite the file if the same file name already exists.
Some advanced features must be supported to fulfill customer needs. They are:
Function Parameter Example Description rm [-r] <remote_filename> remote_filename: remote file name or directory -r : remove all the following subdirectories and files if any.
rm homework.doc rm -r myMP3
Deletes a file or directory. Only the owner of the file can successfully execute this command. config <fragments> fragments: Minimum number of fragments config 3 Sets the minimum number of fragments when putting the file. view Views the neighbors in the neighborhood (in alphabetical order). diff <file1> <file2> <file1> name of first file. <file2> name of second file.
diff Celin.mp3
Deon.mp3Compare whether the contents of <file1> and <file2>
are duplicate.stat <file name> <file name> name of file. stat cat.mp3 List the real location of each fragment of this file in the file system. find <path> <name> <path>: full path name under which to search <name> name of the file to search for.
find \ celin.mp3 Find a file in the path and all its subdirectories. Note: The file name listed above can also include path information, e.g., \musical\Phantom.mp3
The GUI must support all the functions implemented in a visual way.There is no special restriction on the toolkit used for GUI implementation; basically you can use any toolkit you can access in the test environment and are familiar with.
When the user issues get to access a file, error checking should be executed automatically. If the file is corrupted, the original command will continue to execute, but a warning message should follow the result message of the command.
There is no restriction on the algorithm used for error checking. However, algorithms with better error-checking abilities are encouraged.
The online chat should provide a two-way chat between two users.A user list needs to be displayed when entering this system so users can view other chat participants currently in the system.
Users shown in the user list should be able to let other users invite the desired participant to chat.
The invited participant should be able to accept or reject a chat invitation.
It should provide an interactive way to enter messages and view the messages of both local and remote parties.
When applied to the good neighborhood system, each user can keep a "black list" which will block users listed in it from accessing the list owner's local disk.A user interface should be provided to add or remove users from the black list.
A command line tool - vscan, should be provided to perform virus scanning. Contestants should incorporate this tool into the "Good Neighborhood" system.
There should be two functions:
Real-time Scan: Whenever a file access command is issued, the accessed file should be scanned for viruses.
Manual Scan: Users can issue a command to scan for selected or all files in the neighborhood.
vscan syntax
vscan <directory name or file name>
ex: ./vscan ./test
The return code indicate virus count
( 0 for no virus found,and -1 for initial fail or no ScanPath)
Should provide a smooth migration path from the preliminary version to the final version. That is, when installing the final version on a system preinstalled with preliminary version, it should keep the same settings set in the preliminary version.All the previous files stored by the preliminary version should be able to be administered by the final version.
All the functions in the preliminary version still need to be supported and should function properly.
The command utility should be able to batch process commands listed in a file. For example, if users write the following batch file:
start David, mypasswd
ls
put readme.txt
put madonna.mp3
get mariak.jpg
exitThen the commands should be batch executed in sequence. Whenever there is an error, the execution should be halted. The execution response should be echoed on the console.
A failsafe mechanism should be provided to resume an interrupted file download performed by issuing the get command. If the partially downloaded file is still present in the system, a get command issued to resume downloading should only download the unfinished part of the file, not the entire file.
|
Test Environment |
|---|
Hardware specification: Intel Pentium III 600MHz, 128MB RAM, 20GB available hard disk space.
Operating System:
Contestants can choose any of the following environments as designated test environments:
Microsoft Windows 2000 Professional (Service Pack 2), Windows XP Professional
RedHat Linux 7.3 (full install)
|
Evaluation Criteria |
|---|
The evaluation criteria is listed below. Features are weighted by difficulty and importance.
| Feature | Weight |
|---|---|
| Multiple Level Directory | 15 pts |
| Log Support | 20 pts |
| Access Rights | 15 pts |
| Advanced Features | 55 pts |
| Graphic User Interface | 20 pts |
| Integrity Check | 10 pts |
| Online Chat | 15 pts |
| Black List | 10 pts |
| Virus Scan | 15 pts |
| Upgrade and Compatibility | 15 pts |
| Batch Input Support | 10 pts |
| Resume Download | 20 pts |
The scores listed above sum up to more than 100 points.
|
Evaluation Process |
|---|
The evaluation is based on the following criteria:
Note:
咀opyright 2002 Trend Micro Corporation. All Rights Reserved.