User Tools

Site Tools


haas:fall2019:c4eng:projects:mtf0

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:fall2019:c4eng:projects:mtf0 [2019/09/16 13:35] – [Program] wedgehaas:fall2019:c4eng:projects:mtf0 [2019/09/30 11:57] (current) – [Submission] wedge
Line 27: Line 27:
 Your program should: Your program should:
   * have valid, descriptive variable names of length //no shorter than// 4 symbols   * have valid, descriptive variable names of length //no shorter than// 4 symbols
 +    * I will make an exception for the use of 'row'
   * prompt the user for the operation ('+' for addition, '*' for multiplication)   * prompt the user for the operation ('+' for addition, '*' for multiplication)
     * properly store this in a variable of type (signed) **char**     * properly store this in a variable of type (signed) **char**
     * check for a literal '+' or '*' symbol to determine operation to perform     * check for a literal '+' or '*' symbol to determine operation to perform
 +      * if invalid input, display an error and exit with a non-zero value
   * prompt for the row (0-9)   * prompt for the row (0-9)
     * properly store this in a variable of type **unsigned short int**     * properly store this in a variable of type **unsigned short int**
Line 39: Line 41:
     * if not, display an error (to STDERR) and exit with non-zero status code     * if not, display an error (to STDERR) and exit with non-zero status code
   * display the row of the table, performing the indicated operation   * display the row of the table, performing the indicated operation
 +    * display each numerical value in organized, consistent fashion, assuming two-digit numbers
   * using a single return statement at the conclusion of the code, return a 0 indicating successful operation   * using a single return statement at the conclusion of the code, return a 0 indicating successful operation
  
 =====Execution===== =====Execution=====
  
 +====Sample run using multiplication====
 <cli> <cli>
-lab46:~/src/c4eng/dow0$ ./dow0 +lab46:~/src/c4eng/mtf0$ ./mtf0 
-Which year2014 +Which operation ('+' or '*')* 
-January 1st, 2014 falls onWednesday +Row (0-9)
-lab46:~/src/c4eng/dow0+Starting Column (0-9): 1 
 +Ending Column (0-9): 5 
 + 4:  4  8 12 16 20 
 +lab46:~/src/c4eng/mtf0
 </cli> </cli>
  
 The execution of the program is short and simple- obtain the input, do the processing, produce the output, and then terminate. The execution of the program is short and simple- obtain the input, do the processing, produce the output, and then terminate.
  
-====Output Specifications==== +====Sample run using addition==== 
-Your program must output as follows:+<cli> 
 +lab46:~/src/c4eng/mtf0$ ./mtf0 
 +Which operation ('+' or '*'):
 +Row (0-9): 5 
 +Starting Column (0-9): 2 
 +Ending Column (0-9): 7 
 + 5:  7  8  9 10 11 12 
 +lab46:~/src/c4eng/mtf0$  
 +</cli>
  
-  * Input prompts, and everything else except the actual day of the week should be output to STDERR +====Sample run with invalid operation given==== 
-  * The calculated day of the week needs to be displayed to STDOUT +<cli> 
-  * The output MUST contain the "January 1st, YEAR" string +lab46:~/src/c4eng/mtf0$ ./mtf0 
-    * YEAR must be all 4 digits, exactly as input by the user +Which operation ('+' or '*'):
-  * The calculated day of the week must be fully spelled out and correct, with the first letter capitalized, remaining letters lowercase. +ERROR: Must specify either '+' or '*'
-=====Reflection===== +lab46:~/src/c4eng/mtf0$  
-Be sure to provide any commentary on your journal regarding realizations had and discoveries made during your pursuit of this project.+</cli>
  
-  * Try this algorithm on some years in the 20th century and see how it fares+====Sample run with invalid column configuration==== 
-    Is it correct? Is it correct for any of them? +<cli> 
-    * If it isn't correct, is it consistently off by a value?+lab46:~/src/c4eng/mtf0$ ./mtf0 
 +Which operation ('+' or '*'): + 
 +Row (0-9): 5 
 +Starting Column (0-9): 7 
 +Ending Column (0-9): 2 
 +ERROR: Starting column is greater than ending column 
 +lab46:~/src/c4eng/mtf0$  
 +</cli>
  
-This isn't just about implementing a particular algorithm, it is about understanding an algorithm- its domain of correctness, and its limitations. 
  
 =====Submission===== =====Submission=====
Line 73: Line 94:
  
   * Code must compile cleanly (no warnings or errors)   * Code must compile cleanly (no warnings or errors)
-  * Executed program must display a total of 2 lines, one for input, one for output. 
   * Output must be correct, and match the form given in the sample output above.   * Output must be correct, and match 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 
-  * Code must be commented+  * Code must be well commented 
 +  * Do NOT double space your code. Group like statements together.
   * Output Formatting (including spacing) of program must conform to the provided output (see above).   * Output Formatting (including spacing) of program must conform to the provided output (see above).
   * Track/version the source code in a repository   * Track/version the source code in a repository
Line 97: Line 118:
 <code> <code>
 78:mtf0:final tally of results (78/78) 78:mtf0:final tally of results (78/78)
-*:mtf0:data stored and calculated pursuant to algorithm and specifications [4/4+*:mtf0:proper error checking and status reporting performed [13/13
-*:mtf0:code is pushed to lab46 repository [4/4] +*:mtf0:correct variable types and name lengths used [13/13
-*:mtf0:adequate indentation and comments in dow0.c [4/4] +*:mtf0:proper output formatting per specifications [13/13
-*:mtf0:program uses indicated algorithm [12/12+*:mtf0:runtime tests of submitted program succeed [13/13
-*:mtf0:output conforms to project specifications [12/12+*:mtf0:no negative compiler messages for program [13/13] 
-*:mtf0:runtime tests of dow0.c succeed [12/12+*:mtf0:code is pushed to lab46 repository [13/13]
-*:mtf0:no negative compiler messages for dow0.c [4/4]+
 </code> </code>
  
Line 110: Line 130:
   * Solutions not utilizing descriptive why and how comments 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 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+  * Solutions not organized and easy to read are subject to a 25% overall deduction
haas/fall2019/c4eng/projects/mtf0.1568640951.txt.gz · Last modified: 2019/09/16 13:35 by wedge