User Tools

Site Tools


haas:spring2021:cprog:projects:sof0

Differences

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

Link to this comparison view

Next revision
Previous revision
haas:spring2021:cprog:projects:sof0 [2020/08/31 22:12] – external edit 127.0.0.1haas:spring2021:cprog:projects:sof0 [2021/03/01 14:12] (current) – [Submission] wedge
Line 117: Line 117:
     * display any supporting text to STDERR (display of source values left-justified in a space supporting 3-digit values -- see output example below).     * display any supporting text to STDERR (display of source values left-justified in a space supporting 3-digit values -- see output example below).
   * because we have not officially learned how to do selection/have the computer react to conditions, please implement with the assumption that the user will ALWAYS input a correct value. Do not worry about having to check for invalid or illegal input values (I will not be checking for such when I evaluate your project).   * because we have not officially learned how to do selection/have the computer react to conditions, please implement with the assumption that the user will ALWAYS input a correct value. Do not worry about having to check for invalid or illegal input values (I will not be checking for such when I evaluate your project).
 +
 =====Execution===== =====Execution=====
  
 <cli> <cli>
-lab46:~/src/cprog/sof0$ ./sof0+yourpi:~/src/SEMESTER/cprog/sof0$ ./sof0.armv7l
 Enter value: 75 Enter value: 75
 75  x 75  =   5625 75  x 75  =   5625
-lab46:~/src/cprog/sof0$ +yourpi:~/src/SEMESTER/cprog/sof0$ 
 </cli> </cli>
  
Line 133: Line 134:
  
 <cli> <cli>
-lab46:~/src/cprog/sof0$ ./sof0+yourpi:~/src/SEMESTER/cprog/sof0$ ./sof0.armv7l
 Enter value: 105 Enter value: 105
 105 x 105 =  11025 105 x 105 =  11025
-lab46:~/src/cprog/sof0$ +yourpi:~/src/SEMESTER/cprog/sof0$ 
 </cli> </cli>
  
Line 144: Line 145:
  
 <cli> <cli>
-lab46:~/src/cprog/sof0$ ./sof0 2> /dev/null <<< 105+yourpi:~/src/SEMESTER/cprog/sof0$ ./sof0.armv7l 2> /dev/null <<< 105
  11025  11025
-lab46:~/src/cprog/sof0$ +yourpi:~/src/SEMESTER/cprog/sof0$ 
 </cli> </cli>
  
Line 157: Line 158:
  
 <cli> <cli>
-lab46:~/src/cprog/sof0$ ./sof0 1> /dev/null+yourpi:~/src/SEMESTER/cprog/sof0$ ./sof0.armv7l 1> /dev/null
 Enter value: 75 Enter value: 75
-75  x 75  = lab46:~/src/cprog/sof0$ +75  x 75  = yourpi:~/src/SEMESTER/cprog/sof0$ 
 </cli> </cli>
  
Line 176: Line 177:
  
 <cli> <cli>
-lab46:~/src/cprog/sof0$ pchk cprog sof0+lab46:~/src/SEMESTER/cprog/sof0$ pchk cprog sof0
 </cli> </cli>
  
Line 215: Line 216:
   * How many digits is the largest square?   * How many digits is the largest square?
   * How can knowing how many digits the largest square is help you implement your solution?   * How can knowing how many digits the largest square is help you implement your solution?
 +
 =====Review of Compiling/Executing===== =====Review of Compiling/Executing=====
-Just to review the compilation/execution process for working with your source code, if we had a file, **hello.c**, that we wished to compile to a binary called **hello**, we'd first want to compile the code, as follows:+Just to review the compilation/execution process for working with your source code, if we had a file, **hello.c**, that we wished to compile to a binary called **hello**, we'd first want to compile the code, as follows
 + 
 +If compiling on lab46:
  
 <cli> <cli>
-lab46:~/src/cprog/proj$ gcc -Wall --std=gnu99 -o hello hello.c +lab46:~/src/SEMESTER/cprog/PROJECT$ gcc -Wall --std=gnu99 -funsigned-char -o PROJECT.x86_64 PROJECT.c 
-lab46:~/src/cprog/proj+lab46:~/src/SEMESTER/cprog/PROJECT$  
 +</cli> 
 + 
 +If compiling on your pi system: 
 + 
 +<cli> 
 +yourpi:~/src/SEMESTER/cprog/PROJECT$ gcc -Wall --std=gnu99 -funsigned-char -o PROJECT.armv7l PROJECT.c 
 +yourpi:~/src/SEMESTER/cprog/PROJECT
 </cli> </cli>
  
Line 228: Line 239:
  
 <code> <code>
-gcc -Wall --std=gnu99 -o BINARY_FILE SOURCE_FILE+gcc -Wall --std=gnu99 -funsigned-char -o BINARY_FILE SOURCE_FILE
 </code> </code>
  
 The BINARY_FILE comes **immediately after** the **-o**, **NOT** the SOURCE_FILE (the source file must never **immediately** follow a **-o**). It can precede, and such is perfectly valid (especially if you feel that way more intuitive). The BINARY_FILE comes **immediately after** the **-o**, **NOT** the SOURCE_FILE (the source file must never **immediately** follow a **-o**). It can precede, and such is perfectly valid (especially if you feel that way more intuitive).
  
-The **-Wall** (treat all warnings as errors, increase general verbosity about warnings) and **<nowiki>--std=gnu99</nowiki>** (switch compiler to use the **C99** standard of the C language, with GNU extensions) are options given to the compiler.+The **-Wall** (treat all warnings as errors, increase general verbosity about warnings) and **<nowiki>--std=gnu99</nowiki>** (switch compiler to use the **C99** standard of the C language, with GNU extensions) are options given to the compiler. The **<nowiki>-funsigned-char</nowiki>** flag forces "char" types lacking a signed/unsigned qualifier to default to unsigned. 
 + 
 +To execute your binary, we need to specify a path to it, so we use **./**, which basically references the current directory. 
 + 
 +On lab46: 
 + 
 +<cli> 
 +lab46:~/src/SEMESTER/cprog/PROJECT$ ./PROJECT.x86_64 
 +</cli>
  
-To execute your binary, we need to specify a path to it, so we use **./**, which basically references the current directory:+On your pi system:
  
 <cli> <cli>
-lab46:~/src/cprog/proj$ ./hello +yourpi:~/src/SEMESTER/cprog/PROJECT$ ./PROJECT.armv7l
-Hello, World! +
-lab46:~/src/cprog/proj$ +
 </cli> </cli>
  
Line 267: Line 284:
  
 <cli> <cli>
-lab46:~/src/cprog/sof0$ submit cprog sof0 sof0.c+lab46:~/src/SEMESTER/cprog/sof0$ submit cprog sof0 sof0.c
 Submitting cprog project "sof0": Submitting cprog project "sof0":
     -> sof0.c(OK)     -> sof0.c(OK)
Line 280: Line 297:
 <code> <code>
 39:sof0:final tally of results (39/39) 39:sof0:final tally of results (39/39)
-*:sof0:adequate indentation and comments in sof0.c [3/3] +*:sof0:obtained via grabit by Sunday before deadline [3/3] 
-*:sof0:data stored and calculated in correct and separate variables [3/3] +*:sof0:program compiles successfully, no errors [3/3] 
-*:sof0:effective usage of fprintf() and fscanf() [3/3] +*:sof0:program compiles with no warnings [3/3] 
-*:sof0:program uses indicated algorithm [9/9+*:sof0:program performs stated task/algorithm [3/3
-*:sof0:output conforms to project specifications [9/9+*:sof0:program output conforms to formatting expectations [3/3
-*:sof0:runtime tests of sof0.c succeed [6/6+*:sof0:proper error checking and status reporting performed [3/3
-*:sof0:no negative compiler messages for sof0.c [3/3] +*:sof0:code implements solution using relevant concepts [3/3] 
-*:sof0:pushed to lab46 mercurial repository [3/3]+*:sof0:code updates committed/pushed to lab46 semester repo [3/3] 
 +*:sof0:code uses correct variable types and name lengths [3/3] 
 +*:sof0:project is submitted with relevant and complete source [3/3] 
 +*:sof0:project is submitted on lab46 using 'make submit' [3/3] 
 +*:sof0:project is submitted with pi and lab46 binaries [3/3] 
 +*:sof0:runtime tests of submitted program succeed [3/3]
 </code> </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 lacking **ORGANIZATION** and are not easy to read (within 90 char width) are subject to a 25% overall deduction
haas/spring2021/cprog/projects/sof0.1598911968.txt.gz · Last modified: 2020/08/31 22:12 by 127.0.0.1