Acslprogrammingcomponentinstructions
Acslprogrammingcomponentinstructions
In order to make it easier to organize and identify the code files we will use the standard naming
conventionbelowforfuturecompetitions.ThiswaywedonotendupwithmultiplefilescalledMain.
It is also good programming/software engineering practice to name the file something descriptive, so
thatotherswillknowwhatitrefersto.
Format:Division_contestX_L
astNameFirstName_languageVersion
Example:senior_contest1_SmithJohn_python3.py
Notes:
1. Divisionshouldbereplacedwithseniororintermediate.
2. TheXshouldbereplacedwiththecontestnumber.
3. LastNameshouldbereplacedwithyoulastname.
4. FirstNameshouldbereplacedwithyourfirstname.
5. Ifusingpython2.x:languageVersion=python2
6. Ifusingpython3.x:languageVersion=python3
7. IfusingJAVA:languageVersion=java7(or8ifversion8)
8. IfusingC++:languageVersion=C11
9. Allcodefilesshouldbeemailedto:[email protected]
OtherProgramSpecificItems:
1. ThetestdatagivenfortheprogrammingproblemcanonlybeenteredONCE.Thatisallthe
testdatamustbeenteredinoneRUNoftheprogram.Iftheprogramstopsforanyreasonthe
programcannotberestarted.Theonlyexceptionisforincorrectlyenteringthedataandthen
thedatamustbeenteredfromthebeginning.
2. Pleaseformatallprograminput&outputexactlyasitisshownonthesampleinputfromACSL
prompt.Failuretodosowillresultinascoreof0.Thisincludesanywhitespace.
3. Your program is required to run through ALL lines of input. It isyour choicewhetheritaccepts
all of the input lines at once or prompts the user foreachnewlineofinputaftercompletingand
outputting the result ofthepreviousline. YourprogramshouldNOTterminateuntilALLlinesof
inputarerun.
4. Make sure you check for all edge cases (such as adding leading or trailingzeros)whentesting
yourprogramsfunctionalitysothatitmatchesACSLsformat.
5. Please do not have your program print statements such as: This program does the
following as it hinders the automatic grader. You only need to print the output of the
program.
6. Outputsshouldnothaveanextraspaceattheend.
7. Donotpromptforinput(i.e."Input1:")
8. Payattentiontothespacesbetweentheinputs
9. Try to put try catches so if the program fails on one test case, you can still get points for the
onesafter.
10. Makesuretheprogramrunsonexecutiondonotcreateafunctionwithoutcallingit.
11. Makesuretheprogramrepeats5xwithoutrerunning.(putafororawhileloop)
13. Do not use giant ifelif trees. Instead use a switch statement (JAVA, C++) or Dictionary
(Python). Python doesnt have a switch statement like JAVA or C++, but you can obtain the
samefunctionalitybyusingadictionary.
14. PleasereadthePragmaticCodepresentation
15. GeneralitemsforJAVA
a. Makesuretheclassnameisthesameasthefilename.
b. OnlyuseSystem.out.println,notprint.
c. Keep indentations consistent!MostIDEshaveareformatcodefeaturethatautomatically
indentseverythingcorrectly.
d. BufferedReaderispreferredoverScanner,becauseScannerisslowandclunky.