Difference between revisions of "CSC103 Take-Home Final Exam Spring 2012"
(16 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
+ | |||
+ | <tanbox> | ||
+ | This final exam is take-home. It is open-books, open-notes, and open-Web. It is due a week after it is made available, at '''10:20 a.m.''' on Wednesday '''March 14, 2012'''. | ||
+ | |||
+ | The work has to be done individually, not in a group. You cannot discuss the details of this exam with anyone except your prof. The TA is not allowed to help you out with exam material in any way. Questions will only be answered in two ways: if in person, in class only. If outside class time, only via email. If you have questions regarding the exam then you should send your question(s) via email to [mailto:thiebaut@cs.smith.edu thiebaut@cs.smith.edu], and the question and its answer will be broadcast back to the whole class via email. | ||
+ | |||
+ | '''The exam is given under the rules of the Smith College [http://www.smith.edu/sao/handbook/socialconduct/honorcode.php Honor Code].''' | ||
+ | |||
+ | Make sure you reference all work/resources you use to answer the questions below. | ||
+ | |||
+ | ;Grading | ||
+ | :Each problem is worth the same amount of points. You only need to answer three of the four problems. Three problems answered correctly will count as 4 points, or A. If you answer 4 problems, the 3 problems with the best grades will be added up. | ||
+ | |||
+ | </tanbox> | ||
+ | <br /> | ||
+ | <br /> | ||
=What to submit= | =What to submit= | ||
− | * You will need to | + | * You will need to handout your answers on paper on the due date. |
+ | * Use whatever word processor you like to write your answers. When copying/pasting the assembly language or processing code to your document, please use a non-proportional font, such as ''courrier'' for the code: it makes it look nicer, and it is easier to read that way. | ||
+ | * If you cannot submit your work in person, email it to [mailto:thiebaut@cs.smith.edu thiebaut@cs.smith.edu], and make sure the subject of your message reads "'''CSC103 Finall Exam'''". | ||
− | =Boolean Logic= | + | <onlydft> |
+ | =Problem 1: Boolean Logic= | ||
+ | |||
+ | * What is the truth table of the boolean function ''f'' below, which is a function of three boolean variable ''a'', ''b'', and ''c''? | ||
+ | * What is the boolean expression of ''f''? | ||
+ | |||
+ | <br /> | ||
+ | <center> | ||
+ | [[Image:CSC103Final2012BooleanLogic.png]] | ||
+ | </center> | ||
+ | <br /> | ||
− | =Programming in Processing= | + | =Problem 2: Programming in Processing= |
[[Image:CSC103ProcessingFinal2012.png|right|150px]] | [[Image:CSC103ProcessingFinal2012.png|right|150px]] | ||
==Initial Program== | ==Initial Program== | ||
Line 50: | Line 77: | ||
:we make the sketch store a random number into the variable diameter, and we force this random number to be larger than or equal to 0, and less than 200. | :we make the sketch store a random number into the variable diameter, and we force this random number to be larger than or equal to 0, and less than 200. | ||
:When we call '''ellipse()''' and write <tt>random(500)</tt> for both the ''x'' and ''y'' coordinates, we make the sketch put a circle in the window at a random position, but we force the center of the circle to remain inside the window. | :When we call '''ellipse()''' and write <tt>random(500)</tt> for both the ''x'' and ''y'' coordinates, we make the sketch put a circle in the window at a random position, but we force the center of the circle to remain inside the window. | ||
+ | * Make sure you read the documentation on '''random()''' in the [http://processing.org/reference/ reference section] of [http://processing.org/ processing.org] to fully understand what it does. | ||
==Your Assignment== | ==Your Assignment== | ||
− | # make your sketch display circles on the window only when the mouse button is ''pressed''. If the mouse isn't pressed, nothing happens in the window | + | # make your sketch display circles on the window '''only''' when the mouse button is ''pressed''. If the mouse isn't pressed, nothing happens in the window |
# make the circles shrink in size if the mouse moves toward the left side of the window. The circles will grow in size if the mouse moves toward the right side of the window. The circles are still random in size, but their maximum size depends on the mouse position. | # make the circles shrink in size if the mouse moves toward the left side of the window. The circles will grow in size if the mouse moves toward the right side of the window. The circles are still random in size, but their maximum size depends on the mouse position. | ||
# make the circles more random in color and not with this strong ''blue'' tint. Moreover, instead of having 10 circles the same color every time ''draw()'' is called, make each of the 10 a different (random) color. | # make the circles more random in color and not with this strong ''blue'' tint. Moreover, instead of having 10 circles the same color every time ''draw()'' is called, make each of the 10 a different (random) color. | ||
+ | ==Example== | ||
+ | * Here is an example below showing the final sketch running. It is not possible to hear the mouse click but you will see that the generation of circles is interrupted regularly when the user releases the mouse button. | ||
+ | <br /> | ||
+ | <center><videoflash>1g_S8ekD0nk</videoflash></center> | ||
+ | <br /> | ||
+ | |||
+ | ==Submitting the Program (<font color="red">NEW SECTION</font>)== | ||
+ | (Section added on 3/8/12: --[[User:Thiebaut|D. Thiebaut]] 09:56, 8 March 2012 (EST)) | ||
+ | * Please submit the code of your sketch the same way you did for [[CSC103_Homework_5_2012 | Homework 5]]. | ||
+ | * Go to this URL: http://maven.smith.edu/~103b/submitfinal.htm | ||
+ | * Enter your 2-letter Id (same as the one you used in Homework 5) | ||
+ | * Add your name in the top of the text area, prefixed with two slashes (to make it a comment) | ||
+ | * Paste your code in the text area, and | ||
+ | * Submit it! | ||
+ | <br /><br /><br /> | ||
+ | <tanbox>You should still submit a copy of your sketch on paper with your final exam.</tanbox> | ||
+ | <br /><br /><br /><br /> | ||
− | =Assembly Language Program= | + | =Problem 3: Assembly Language Program= |
* Write a assembly language program that contains 1 variable, '''var1''', and one loop, and that computes the sum of all the integers between 10 and 1 and stores this sum in '''var1'''. | * Write a assembly language program that contains 1 variable, '''var1''', and one loop, and that computes the sum of all the integers between 10 and 1 and stores this sum in '''var1'''. | ||
Line 65: | Line 110: | ||
* When your program stops, '''var1''' will contain 55. | * When your program stops, '''var1''' will contain 55. | ||
* Your program must compute this value by summing up 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 and storing the result in '''var1'''. | * Your program must compute this value by summing up 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 and storing the result in '''var1'''. | ||
− | * The following program is not acceptable: | + | * The following program is <font color="red">'''not acceptable'''</font>: |
− | lod-c 55 | + | lod-c 55 |
sto var1 | sto var1 | ||
:You must use a loop! | :You must use a loop! | ||
− | =Essay Question | + | =Problem 4: Essay Question= |
− | * Pick a particular technological process, and a measure associated with it (computer speed, amount of data generated, size of a device, ability to process some quantity of information) and explain in a 1-page paper how it has evolved '''during your life time'''. Make sure you find several data points spanning your 20 | + | * Pick a particular technological process, and a measure associated with it (computer speed, amount of data generated, size of a device, ability to process some quantity of information) and explain in a 1-page paper how it has evolved '''during your life time'''. Make sure you find several data points spanning your 20-year time scale and indicate if these points represent an exponential growth, and if not what kind of growth that is. |
* Please type your answer so that it fits one page of text, single spaced. You may include graphs to support your explanations. | * Please type your answer so that it fits one page of text, single spaced. You may include graphs to support your explanations. | ||
+ | * Make sure you reference your sources. | ||
</onlydft> | </onlydft> |
Latest revision as of 09:13, 7 October 2013
This final exam is take-home. It is open-books, open-notes, and open-Web. It is due a week after it is made available, at 10:20 a.m. on Wednesday March 14, 2012.
The work has to be done individually, not in a group. You cannot discuss the details of this exam with anyone except your prof. The TA is not allowed to help you out with exam material in any way. Questions will only be answered in two ways: if in person, in class only. If outside class time, only via email. If you have questions regarding the exam then you should send your question(s) via email to thiebaut@cs.smith.edu, and the question and its answer will be broadcast back to the whole class via email.
The exam is given under the rules of the Smith College Honor Code.
Make sure you reference all work/resources you use to answer the questions below.
- Grading
- Each problem is worth the same amount of points. You only need to answer three of the four problems. Three problems answered correctly will count as 4 points, or A. If you answer 4 problems, the 3 problems with the best grades will be added up.
What to submit
- You will need to handout your answers on paper on the due date.
- Use whatever word processor you like to write your answers. When copying/pasting the assembly language or processing code to your document, please use a non-proportional font, such as courrier for the code: it makes it look nicer, and it is easier to read that way.
- If you cannot submit your work in person, email it to thiebaut@cs.smith.edu, and make sure the subject of your message reads "CSC103 Finall Exam".