-- Lessons --
Presentations
Assignments
Checkpoint #1
Shooter Graphics
Shooter Audio
Shooter 10/27/09
Frame Animation
3D XNA Game
-- Support Files --
Welcome Page
Course Syllabus
Instructor Bio
|
Checkpoint #1
Create a C# project and .cs source file using Visual Studio
that follows this specification:
Name the project checkpoint1.
For each of the requirements below, use appropriate output documentation
to illustrate what is being demonstrated by each of the following
items.
- Create a loop to get input from the player. Keep going until
the player types in an upper case Y. If the player types anything
else, provide an error message and a correct input prompt. Then
exit the loop and type a thank you message.
- Create a loop that executes only if a certain value is set. Test
your program with the value set to the certain value you choose
and with the value set to another value. Echo the value each time.
Exit the loop when the variable is set to the other value.
Bonus points - Learn how to do in put validation:
See: How to: Convert a string to an int (C# Programming Guide)
// http://msdn.microsoft.com/en-us/library/bb397679.aspx
- Create a loop that iterates 8 times and prints out the first 8
positive odd integers. Use the increment on the loop to generate
each odd number.
- Create a loop that counts down from 20 to "BLAST OFF!"
Echo each value from 20 to 0.
- Create an array of 10 elements that are random numbers. Use another random number to select one of the values in the array.
Print the entire array of random numbers, the random selection number,
and the element that was selected.
- Create a 2 dimensional array with three rows and three columns.
Alternate "X" and "O" as values and print the
array in a rectangular grid to simulate a Tic Tac Toe board.
Test your program and post the solution as a .zip file on your student-iat ftp account. Name the zip file checkpoint1.zip
Sample output file Sample source file
|