This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:fall2017:cprog:projects:pnc0 [2017/09/24 16:49] – wedge | haas:fall2017:cprog:projects:pnc0 [2017/10/15 20:51] (current) – [Evaluation Criteria] wedge | ||
---|---|---|---|
Line 3: | Line 3: | ||
< | < | ||
</ | </ | ||
- | |||
- | ~~TOC~~ | ||
======Project: | ======Project: | ||
Line 91: | Line 89: | ||
* an inner loop that tests that current number to see if it has any factors | * an inner loop that tests that current number to see if it has any factors | ||
* you know the starting value and the terminating condition, so you have a clear starting and ending point to work with. | * you know the starting value and the terminating condition, so you have a clear starting and ending point to work with. | ||
- | * I want you to use two **DIFFERENT** kind of loops in your programs. If you use a **for()** loop in your outer loop, I want you to use a **while()** or **do-while()** loop in your inner loop (and whatever combination you end up with). | ||
* I do **NOT** want to see ambiguous, one-letter variables used in your implementation(s). Please use // | * I do **NOT** want to see ambiguous, one-letter variables used in your implementation(s). Please use // | ||
* Some good examples of variable names would be: | * Some good examples of variable names would be: | ||
Line 106: | Line 103: | ||
* and remember, the baseline brute force algorithm (**primereg**) may well identify a value as composite, but won't terminate the loop. | * and remember, the baseline brute force algorithm (**primereg**) may well identify a value as composite, but won't terminate the loop. | ||
* your timing should start before the loop (just AFTER argument processing), | * your timing should start before the loop (just AFTER argument processing), | ||
- | * you may **NOT** split **qty** and **range** functionality into two separate code blocks (ie have two sets of two loops). Only the one set as indicated. | ||
=====prime algorithm implementation===== | =====prime algorithm implementation===== | ||
Line 155: | Line 151: | ||
* each program is to have no fewer and no more than 2 loops in this prime processing section. | * each program is to have no fewer and no more than 2 loops in this prime processing section. | ||
* display identified primes (space-separated) to **STDOUT** | * display identified primes (space-separated) to **STDOUT** | ||
- | * stop your stopwatch immediately following your prime processing loops (and terminating newline display to **primelist**). Calculate the time that has transpired (ending time minus starting time). | + | * stop your stopwatch immediately following your prime processing loops (and terminating newline display to **STDOUT**). Calculate the time that has transpired (ending time minus starting time). |
* output the processing run-time to **STDERR** | * output the processing run-time to **STDERR** | ||
* your output **MUST** conform to the example output in the **execution** section below. This is also a test to see how well you can implement to specifications. Basically: | * your output **MUST** conform to the example output in the **execution** section below. This is also a test to see how well you can implement to specifications. Basically: | ||
Line 690: | Line 686: | ||
< | < | ||
- | 39:pnc0:final tally of results (39/39) | + | 78:pnc0:final tally of results (78/78) |
</ | </ | ||
Line 696: | Line 692: | ||
< | < | ||
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
- | *: | + | *: |
*: | *: | ||
</ | </ | ||
As the optimizations improve upon others, some evaluations will be based upon differences between a baseline (in some cases, primereg) and the optimization. | As the optimizations improve upon others, some evaluations will be based upon differences between a baseline (in some cases, primereg) and the optimization. |