Corning Community College
C/C++ Programming
End of Course Experience
~~TOC~~
Presented within will be various questions evaluating your knowledge and experience gained this semester. In places where you are able, the more you write and explain topics the better the chance you will have of receiving full credit (and alternatively, the more credit you will receive should something be incorrect).
The questions on this experience are open resource with the exception of other individuals. In that respect, it is CLOSED PERSON. This means you are not to communicate with other people (either in the class or otherwise), in real life or electronically. Use your own knowledge, use your skills, and use your ability to access the allowed resources to aid you in coming up with your well thought out answers to each question.
You are allowed, and expected, to ask me questions, so that a problem can be better clarified.
You are to do all questions. Submission is to be in an organized and easy to read format in a plain text file, such as in an e-mail with attachments on Lab46, sent to wedge@lab46.corning-cc.edu and yourself.
You have until 11:59:59pm (that's 23:59:59 in 24-hour time) Wednesday, May 18th, 2011 to complete and submit this to me.
Although do have a scheduled finals week meeting time (Tuesday, May 17th, 2011 from 11:15am-2:15pm), you are also welcome to come to the BDC, Room B003 for questions on:
Good luck!
Analyze the following code:
printf("a: %d\n", a); printf("b: %d\n", b); if (a = b) ; // do nothing else a = a ^ b; // else do this b = a ^ b; // and this a = a ^ b; // and this printf("a: %d\n", a); printf("b: %d\n", b);
Answer me the following:
Looking at the following code snippet:
int i; for(i=0; i<10; i++) { printf("%d\n", (i * i)); }
Answer me the following:
Analyze the following program:
#include<stdio.h> int main() { int i, j = 1; for(i=1; i<=255; i=i<<1) { j = j * 3; } return(0); }
And tell me:
In C++, write a Color class that accomplishes the following:
To “add” or “subtract” colors, look to actual color combinations:
Might there be some mathematical relationship between the colors, so that we can apply numerical values to aid us in our processing?
With the completion of your Color class, write a small application program (ie a main()) that instantiates a few Color objects.
With this program, do the following:
In “Shoveling Bob” we have the main player, which occupies a position on the screen.
There are to be a few opponents also located on the screen, with their respective coordinates.
During gameplay, there are interactions that take place between the player and opponents. For this to take place, our game logic needs to detect when a “collision” takes place. A collision is when the edge of one object intersects with another.
In our game, we'll use the 32×32 square box as the boundaries of the object. This facilitates the task of detecting collisions:
Considering 3 objects on the screen (one player, two opponents), write some logic that will check to see if any collisions between the player and the two opponents has taken place.
Please define, and provide small (but complete) programs that demonstrate the following concepts:
Write small C/C++ programs that accomplish the following:
After an exciting and intellectually challenging run, we're arriving at the end of this semester's journey. The course as we all experienced it, unfolds in a manner pertaining in part to how you respond to concepts and topics (do we need more time, can I crank it up a couple notches, etc.) so each semester and each class is entirely different from any other- because of each of you, and all of us, working together and learning together.
So, searching deep down within your soul- balancing reason with emotion, and considering attendance and timeliness; answer me the following:
When done, compose an e-mail to me with your responses to the various questions. There is no electronic submission form for the EoCE.
Be sure your e-mail is organized and easy to read!