Lab-4
Join the Blocks
Announcements
There will be 5 minutes’ quiz available on Blackboard at the beginning of each of the lab session. Please sign in to your Blackboard account and finish the quiz individually. Most of your time should be focused on finishing the lab activity question.
You must work with a single partner i.e., in a group of 2 (If there are an odd-number of students in the class, your TA will make an adjustment). You must take turns being the “driver” and the “navigator” while working on the lab activity.
Lab Grading policy
You must work with a partner for credit.
You must finish at least step1 and step 2 to get 1 point. Step 3 to Step 6 are worth another 1 point. The maximum score is 2. Step 7 fetches you an extra credit.
To get a grade you must raise your hand once you are done till step 6 which should take you around 30 minutes after completing the quiz and wait for the TA to review your work. If attempting the extra credit part, seek the TA’s approval before working on Step 7. You must raise your hand again after you complete Step 7 and get your work reviewed once again in the last 15 minutes of the lab session. Late submission is not accepted.
Lab Activity
This lab activity focuses on problem-solving using paper and pencil, without coding. The problem domain is the paper-n-pencil game, Tic-Tac-Toe.
Instructions
Consider the game Tic-tac-toe. Play a couple of rounds to be sure both team members know how it works. Can you always win? Always tie? Why?
Steps You Need to Do
Preparation: Get a 8.5 x 11 piece of paper and rip it into 8 equal pieces.
Independently think of the principle areas of functionality in a tic-tac-toe program.
Make each one of these areas its own function call. Make the function name self-explanatory. Write down ONLY the function name (and no return value or parameters) on one of your separate pieces of paper. For each function also write a 1 sentence description of what it does.
Compare your solution with that of your partner, and come up with a composite set of functions that does everything you need for the full program to work correctly.
On a separate piece of paper list the variables you will need
Place your functions in the order they would be used on another piece of paper (your algorithm). If there is any section that repeats, then draw an arrow showing where the repetition is, and write down the ending condition for the repetition.
Compare with another group, pointing out any missing parts of the algorithm. Is it complete? If not, what is missing? Which solution is better? Why?
Get one of the TAs to check your work.
Done? For a grade of 3 you must also specify all the parameters and return values for all the functions.
1-31-2017