User Tools

Site Tools


haas:fall2019:discrete:projects:mtf1

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:discrete:projects:mtf1 [2019/09/23 17:35] – [Program] wedgehaas:fall2019:discrete:projects:mtf1 [2019/09/26 17:59] (current) wedge
Line 24: Line 24:
     * if it exists and doesn't contain a valid symbol, display an error and exit     * if it exists and doesn't contain a valid symbol, display an error and exit
   * for some operations, the result violates the properties of mathematics. In the case of such invalid results, display "NA" instead of a number (within the same fixed/formatted spacing)   * for some operations, the result violates the properties of mathematics. In the case of such invalid results, display "NA" instead of a number (within the same fixed/formatted spacing)
-  * for the non-associative operations, the variable driving the individual rows should be the one operated on (ie row - col)+  * for the non-associative operations, the variable driving the individual rows should be the one operated on (ie result = row - col)
 =====Program Output===== =====Program Output=====
  
Line 45: Line 45:
 ====Altering the operation to perform (addition)==== ====Altering the operation to perform (addition)====
 <cli> <cli>
-lab46:~/src/discrete/mtf1$ ./mtf1+lab46:~/src/discrete/mtf1$ MTF1_OPER="+" ./mtf1
       1  2  3  4  5  6  7  8  9        1  2  3  4  5  6  7  8  9 
   [+]---------------------------    [+]--------------------------- 
Line 61: Line 61:
 ====Subtraction==== ====Subtraction====
 <cli> <cli>
-lab46:~/src/discrete/mtf1$ OPER="-" ./mtf1 7+lab46:~/src/discrete/mtf1$ MTF1_OPER="-" ./mtf1 7
       1  2  3  4  5  6        1  2  3  4  5  6 
   [-]------------------    [-]------------------ 
Line 74: Line 74:
 ====Division==== ====Division====
 <cli> <cli>
-lab46:~/src/discrete/mtf1$ OPER="/" ./mtf1 16+lab46:~/src/discrete/mtf1$ MTF1_OPER="/" ./mtf1 16
       1  2  3  4  5  6  7  8  9  A  B  C  D  E  F        1  2  3  4  5  6  7  8  9  A  B  C  D  E  F 
   [/]---------------------------------------------    [/]--------------------------------------------- 
Line 96: Line 96:
 ====Remainder==== ====Remainder====
 <cli> <cli>
-lab46:~/src/discrete/mtf1$ OPER="%" ./mtf1 9+lab46:~/src/discrete/mtf1$ MTF1_OPER="%" ./mtf1 9
       1  2  3  4  5  6  7  8        1  2  3  4  5  6  7  8 
   [%]------------------------    [%]------------------------ 
Line 159: Line 159:
  
 An issue you might run into is how much space will you have to allocate (you want it universal for the display of the entire table). For that, I say determine the length of the maximum value being output (ie the bottom-most right value). That value’s length should then influence all the other output in the table. An issue you might run into is how much space will you have to allocate (you want it universal for the display of the entire table). For that, I say determine the length of the maximum value being output (ie the bottom-most right value). That value’s length should then influence all the other output in the table.
 +
 +=====Submission=====
 +To successfully complete this project, the following criteria must be met:
 +
 +  * Code must compile cleanly (no warnings or errors)
 +    * Use the **-Wall** and **--std=gnu99** flags when compiling.
 +  * Code must be nicely and consistently indented (you may use the **indent** tool)
 +  * Code must utilize the algorithm/approach presented above
 +  * Output **must** match the specifications presented above (when given the same inputs)
 +  * Code must be commented
 +    * be sure your comments reflect the **how** and **why** of what you are doing, not merely the **what**.
 +  * Track/version the source code in a repository
 +  * Submit a copy of your source code to me using the **submit** tool.
 +
 +To submit this program to me using the **submit** tool, run the following command at your lab46 prompt:
 +
 +<cli>
 +$ submit discrete mtf1 mtf1.c
 +Submitting discrete project "mtf1":
 +    -> mtf1.c(OK)
 +
 +SUCCESSFULLY SUBMITTED
 +</cli>
 +
 +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.
haas/fall2019/discrete/projects/mtf1.1569260128.txt.gz · Last modified: 2019/09/23 17:35 by wedge