User Tools

Site Tools


haas:spring2016:cprog:projects:sam0

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:spring2016:cprog:projects:sam0 [2016/03/15 12:54] – [Program] wedgehaas:spring2016:cprog:projects:sam0 [2016/03/15 13:04] (current) – [Submission] wedge
Line 35: Line 35:
 The key should be a **signed char**, allowing for a cipher shift of -128 to +127 (your shift can be left or right, depending on the sign of the number). The key should be a **signed char**, allowing for a cipher shift of -128 to +127 (your shift can be left or right, depending on the sign of the number).
  
-The **encode** and **decode** functionality should be located in functions, which your program's **main()** function calls upon determining the specified mode of operation.+The **encode** and **decode** functionality will be located in functions you declare and define, which your program's **main()** function calls upon determining the specified mode of operation.
  
 Operating mode will be determined by the program's name: Operating mode will be determined by the program's name:
Line 53: Line 53:
     * display the resultant string to STDOUT     * display the resultant string to STDOUT
     * the cipher should work only on upper and lowercase letters of the alphabet. Any punctuation, number, whitespace, or other symbol should remain intact (knowing your ASCII table would be helpful).     * the cipher should work only on upper and lowercase letters of the alphabet. Any punctuation, number, whitespace, or other symbol should remain intact (knowing your ASCII table would be helpful).
 +    * the encoding and decoding functionality needs to occur within declared/defined functions you create that are called from **main()** to perform the intended operation.
 +      * As they will be performing operations on your array filled with the input data, you also need to make productive use of loops.
 +      * all data needed by the function needs to be passed in by parameter! No global variables.
 +      * The functions should return an integer containing the exact count of non-letters encountered (and therefore left unmodified from input to output). Your **main()** function needs to return this value when complete.
  
 +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.
 ====Sample execution: encode==== ====Sample execution: encode====
 Via positive command-line key: Via positive command-line key:
Line 137: Line 144:
  
   * Code must compile cleanly (no warnings or errors)   * Code must compile cleanly (no warnings or errors)
 +    * Use the **-Wall** flag 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)
haas/spring2016/cprog/projects/sam0.1458046488.txt.gz · Last modified: 2016/03/15 12:54 by wedge