Description
Take the GMU CS honor code and make it into an interactive program. When the
program is run, the preamble (“All CS students must adhere…”) should display along with a
menu. The menu will allow the user to see the contents of specific sections of the honor code
(such as “You (or your group, if a group assignment) may”), print the honor code to the file, or
quit the program. If the user chooses an option other than quitting, the menu should display
again.
You must:
• Name your main class “PA1”.
• Cite the source of the text (you didn’t write it, so you need to cite it)
• Check for improper input from the user (for both the file and the menu selection)
• Have a style (indentation, good variable names, etc.)
• Comment your code well (no need to over do it, just do it well)
You may:
• Add additional classes/methods.
You may not:
• Make your program part of a package.
Submission Instructions:
• Name a folder with your gmu username
• Put your java files in the folder (but not your .class or .java~ files)
• Zip the folder (not just the files) and name the zip “username-pa1.zip”
• Submit to blackboard
Grading Rubric
No Credit:
• Non submitted assignments
• Late assignments
• Non compiling assignments
• Non-independent work
2pt Submission Format
2pt Style and Comments
2pts File Output
4pts Interactive Program
Example Run
> java PA1
CS Honor Code Policies
(Source: [citation here])
All CS students must adhere to the GMU Honor Code. In addition to this honor code, the computer science
department has further honor code policies regarding programming projects, which is detailed below. Your
instructor may state further policies for his or her class as well.
Unless otherwise stated, at the time that an assignment or project is given, all work handed in for credit is to be
the result of individual effort. (In some classes group work is encouraged; if so, that will be made explicit when
the assignment is given.)
——————————————————–
Select an option from the following menu:
1) View contents: You (or your group, if a group assignment) may…
2) View contents: You (or your group, if a group assignment) may not seek assistance from anyone else, other
than your instructor or teaching assistant…
3) View contents: Unless permission to do so is granted by the instructor, you (or your group, if a group
assignment) may not…
4) View contents: You must…
5) Print the honor code to output.txt
6) Quit
——————————————————–
What do you want to do? 48
This is not a valid selection.
——————————————————–
Select an option from the following menu:
1) View contents: You (or your group, if a group assignment) may…
2) View contents: You (or your group, if a group assignment) may not seek assistance from anyone else, other
than your instructor or teaching assistant…
3) View contents: Unless permission to do so is granted by the instructor, you (or your group, if a group
assignment) may not…
4) View contents: You must…
5) Print the honor code to output.txt
6) Quit
——————————————————–
What do you want to do? 5
The honor code has been printed to output.txt
——————————————————–
Select an option from the following menu:
1) View contents: You (or your group, if a group assignment) may…
2) View contents: You (or your group, if a group assignment) may not seek assistance from anyone else, other
than your instructor or teaching assistant…
3) View contents: Unless permission to do so is granted by the instructor, you (or your group, if a group
assignment) may not…
4) View contents: You must…
5) Print the honor code to output.txt
6) Quit
——————————————————–
What do you want to do? 6
Goodbye!
>