User Tools

Site Tools


haas:spring2020:cprog:projects:sam0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
haas:spring2020:cprog:projects:sam0 [2016/03/15 13:04] – external edit 127.0.0.1haas:spring2020:cprog:projects:sam0 [2020/03/27 14:15] (current) – [Sample execution: encode] wedge
Line 3: Line 3:
 <WRAP><fs 150%>CSCS1320 C/C++ Programming</fs></WRAP> <WRAP><fs 150%>CSCS1320 C/C++ Programming</fs></WRAP>
 </WRAP> </WRAP>
- 
-~~TOC~~ 
  
 ======Project: Data Obfuscation - SECRET AGENT MESSAGES (sam0)====== ======Project: Data Obfuscation - SECRET AGENT MESSAGES (sam0)======
Line 26: Line 24:
   * encoding - taking the readable text and making it obfuscated, according to a set process   * encoding - taking the readable text and making it obfuscated, according to a set process
   * decoding - taking the obfuscated text and making it readable, by reversing the process   * decoding - taking the obfuscated text and making it readable, by reversing the process
 +
 +Please NOT: What we are doing is **encoding**, and NOT encrypting.
 =====Program===== =====Program=====
 You are to implement one program, which contains two fundamental modes of operation: You are to implement one program, which contains two fundamental modes of operation:
Line 42: Line 42:
   * Naming your program **decode** will invoke the decoding functionality.   * Naming your program **decode** will invoke the decoding functionality.
   * Mode auto-detection should work regardless of any prefixing path information (**./decode**, **/home/$USER/src/cprog/sam0/encode**, etc.)   * Mode auto-detection should work regardless of any prefixing path information (**./decode**, **/home/$USER/src/cprog/sam0/encode**, etc.)
-    * you may want to explore the **strtok(3)** function, or write your own.+    * you may want to explore the **strtok(3)** or **basename(3)** functions to assist you, or write your own to obtain similar functionality.
  
 Your program needs to: Your program needs to:
Line 60: Line 60:
 Your program should be a "one shot". It should only perform its intended operation and exit. No prompting for encode/decode, no "do you want to go again"... just a read from input, process, output, and exit with appropriate return value. They should conform to the execution examples found in this project. Your program should be a "one shot". It should only perform its intended operation and exit. No prompting for encode/decode, no "do you want to go again"... just a read from input, process, output, and exit with appropriate return value. They should conform to the execution examples found in this project.
  
-When compiling, an additional constraint is added: compile with the **-Wall** flag.+When compiling, an additional constraint is added: compile with the **-Wall** and **<nowiki>--</nowiki>std=gnu99** flags.
 ====Sample execution: encode==== ====Sample execution: encode====
 Via positive command-line key: Via positive command-line key:
Line 68: Line 68:
 "hello"!! "hello"!!
 "jgnnq"!! "jgnnq"!!
 +emmbzwc
 +goodbye
 ^D ^D
 lab46:~/src/cprog/sam0$  lab46:~/src/cprog/sam0$ 
 </cli> </cli>
  
-(**NOTE:** ^D indicated the CTRL-d sequence, which generates an EOF).+**NOTE:** ^D indicated the CTRL-d sequence, which generates an EOF. That is the keypress you use to terminate the program; do NOT have your program display '^D' and exit on its own after one input, for there may be many.
  
 Via negative command-line key: Via negative command-line key:
Line 144: Line 146:
  
   * Code must compile cleanly (no warnings or errors)   * Code must compile cleanly (no warnings or errors)
-    * Use the **-Wall** flag when compiling.+    * Use the **-Wall** and **<nowiki>--std=gnu99</nowiki>** flags when compiling.
   * Output must be correct, and resemble the form given in the sample output above.   * Output must be correct, and resemble the form given in the sample output above.
   * Code must be nicely and consistently indented (you may use the **indent** tool)   * Code must be nicely and consistently indented (you may use the **indent** tool)
Line 165: Line 167:
  
 You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches. You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.
 +
 +=====Evaluation Criteria=====
 +
 +What I will be looking for:
 +
 +<code>
 +78:sam0:final tally of results (78/78)
 +*:sam0:sam0.c compiles cleanly, no compiler messages [13/13]
 +*:sam0:sam0.c implements only specified algorithm [13/13]
 +*:sam0:sam0.c code conforms to project specifications [13/13]
 +*:sam0:sam0.c code committed and pushed to repository [13/13]
 +*:sam0:sam0 runtime output conforms to specifications [26/26]
 +</code>
 +
 +Additionally:
 +  * Solutions not abiding by spirit of project will be subject to a 25% overall deduction
 +  * Solutions not utilizing descriptive why and how comments will be subject to a 25% overall deduction
 +  * Solutions not utilizing indentation to promote scope and clarity will be subject to a 25% overall deduction
 +  * Solutions not organized and easy to read (assume a terminal at least 90 characters wide, 40 characters tall) are subject to a 25% overall deduction
haas/spring2020/cprog/projects/sam0.1458047072.txt.gz · Last modified: 2016/03/15 13:04 by 127.0.0.1