CSCI202: Computer Programming II

Updated 2020-05-04

Syllabus     XNA on YouTube     Finals Schedule     Academic Calendar

Final Test will be Thursday, 5/7/2020 at 12:30 p.m.

Things students already know how to do:

 

Corona office hours: I am planning to hold virtual office hours at the same time we used to have class (12:30 Tuesday and Thursday).However, I will probably keep my Zoom meeting "room" open beyond those hours. So, if you have a question, try the following link before emailing: https://zoom.us/j/8345726921. You may also call/text my cell phone (before 10 p.m.): 712-301-8391.

Final Test

·         Program shell zip file.

·         Questions

 

 

 

 

 

 

 

 

 

 

Day #26. Thursday, 4/30/2020

·         A particle class. Particles

·         Review/practice test. Shell program. Solution.

·         Blackjack. Completed program from last class.

·         Practice test videos: problems 1 & 2, problem 3, problem 4

·         Video of today's class

Day #25. Tuesday, 4/28/2020: More classes

·         Blackjack: A card class and a card deck class.

Homework due at the end of the semester

·         Frogger. Frogger sprites. Frogger pre-written classes. Frogger class shell

Videos from earlier classes

·         April 2: part 1, part 2

·         April 7: video

·         April 9: video (last part of class only)

·         April 14: video

·         April 16: video

Day #24. Thursday, 4/23/2020: More Classes and Objects

·         A Fraction class. default constructor, parameterized constructors, copy constructor, ToString, ToDouble, times, plus, reduce, reduced, six relational methods (Equals, NE, GT, LT, GE, LE). Throwing and catching exceptions in C# (divide by 0).

·         Videos on the Fraction class: Part 1, Part 2, Part 3, Part 4, Part 5, Part 6.

Homework due at the end of the semester

·         Frogger. Frogger sprites. Frogger pre-written classes. Frogger class shell

Day #23. Tuesday, 4/21/2020: More Classes and Objects

·         Workday for Frogger. Today's code (with a few extras).

Homework due at the end of the semester

·         Frogger. Frogger sprites. Frogger pre-written classes. Frogger class shell

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Day #22. Thursday, 4/16/2020: More Classes and Objects

·         Another explanation of OOP. Another. Another.

·         A simple Jar class: 2 private variables, 2 constructors, 2 property-procedure pairs, IsEmpty(), IsFull(), Fill(x), Empty(x), ToString(), Equals(x), overflow/underflow exceptions.

·         The Frogger class.

Homework due at the end of the semester

·         Frogger. Frogger sprites. Frogger pre-written classes. Frogger class shell

Day #21. Tuesday, 4/14/2020: Classes and objects

·         Introduction to classes. Notes

·         If we were doing three tests, this is the practice test for what would have been the second test.

o    Test topics. Practice test instructions. Practice test: Template. Solution. Data file.

o    Video solutions: Problem 1, problem 2, problem 3, problem 4.

Day #20. Thursday, 4/09/2020: Array algorithms

·         Array algorithms (continued) Notes. An array of structs, each of which contains an array

o    Function: student average of array of int. Video

o    Function: test average of an element in parallel arrays of int. Video

o    Function: student top score—max of an array of int. Video

o    Function: student worst score—min of an array of int. Video

Homework #12. Due Tuesday, 4/14/2020:

·         Life. 2D arrays, file input. Data Files. Video. Video. Video of Life2.txt. Video of Life480x480.txt.

Day #19. Tuesday, 4/07/2020

·         Files, arrays, and functions: Notes.

·         Discuss Life

Homework #12. Due Tuesday, 4/14/2020:

·         Life. 2D arrays, file input. Data Files. Video. Video. Video of Life2.txt. Video of Life480x480.txt.

Day #18. Thursday, 4/02/2020: Files

·         Discuss Tic-Tac-Toe: functions, parameters (took about half of period in 2018)

·         Files: Notes

·         April 2, part 1: https://youtu.be/Rhl1pOtfkhg

·         April 2, part 2: https://youtu.be/OC757Vc_3T0

Homework due Tuesday 4/07/2020:

·         Tic-Tac-Toe. 2D arrays, mouse input

Day #17. Tuesday, 3/31/2020: 2D arrays, Mouse input, Minesweeper (in class)

·         2D arrays. Notes. Video 1: overview. Video 2: visit each item in a row. Video 3: visit each item in a column. Video 4: visiting ALL items.

·         Debugging review. Notes.

·         Functions. Notes.

·         Multi-way branching made cleaner. Notes. Video 1. Video 2. Video 3.

·         Stopping prematurely: the return statement: Notes, the break statement: Notes

·         Mouse Input. Notes.

·         Minesweeper. Notes. Template. Videos (there are 5, but the next 4 will automatically follow). How to play Minesweeper.

Homework due Tuesday 4/07/2020:

·         Tic-Tac-Toe. 2D arrays, mouse input

Day #16. Thursday, 3/26/2020: 2D arrays

·         Two-dimensional array algorithms involve nested loops. Today we will look at problems whose solution requires nested loops. Notes.

Day #15. Tuesday, 3/24/2020: Parameters

·         Functions review. Notes

·         Reference parameters. Notes. Sample pong program.

Complete version of Space Invaders due next Tuesday:

·         Continue working on Space Invaders. Hand in a zipped copy of your project in the drop box.

Day #14. Thursday, 3/12/2020: Sprite sheets

·         Sprite sheet animation: Notes. Files.

·         Crossing the screen slowly (like space invaders): Notes

·         Invader bullets. Notes.

·         Extra time? Work on Invaders. USE FUNCTIONS!

Program #9, part 1 of Space Invaders due next class:

·         Space Invaders overview. Part 1 of the Space Invaders program. Image files. Hand in a zipped copy of your project in the drop box.

Day #13. Tuesday, 3/10/2020

·         25 most recommended programming books of all time.

·         Brickout: placing bricks. Notes

·         Brickout: variables and initialize code.

·         Brickout: varying the bounce angle. Notes.

·         Free looping sound files. They are relatively small and can be used for background sound.

Homework due Thursday, March 12, 2020:

·         Program #8: Brickout!

Day #12. Thursday, 2/27/2020

Day #11. Tuesday, 2/25/2020

·         Test #1 is Thursday.

·         Arrays. Notes.

·         An array of asteroids. Notes. Asteroid. Bullet.

·         Topics to know for the test.

Homework due Thursday, March 12, 2020:

·         Program #8: Brickout!

Day #10. Thursday, 2/20/2020. Arrays

·         Computer history: card stunt software.

·         New C# elements:

·         Structs. Notes.

·         Enumerated data types and game state. Notes. Code to modify.

·         Moving things at an angle: Notes.

·         Collision detection in Whack an Asteroid.

·         Debugging: Slowing down the clock: Notes

·         Debugging: Setting breakpoints and watch lists: Notes.

·         Changing the window size: Notes

·         Test is 1 week from today.

Homework due next class:

·         Program #7: Whack an asteroid.

Day #9. Tuesday, 2/18/2020

·         Another version of the Draw method. Notes. Marilyn. Asteroid. Arrow.

·         All 8 versions of Draw.

·         Moving things at an angle: Notes.

Homework due next class Day 11 (2/25/2020):

·         Program #7: Whack an asteroid.

Day #8. Thursday, 2/13/2020. Functions, Debugging

·         Does your Alien Shooter program work if you change the play area dimensions?

·         Functions: Notes.

Day #7. Tuesday, 2/11/2020. Sounds, text alignment, functions

·         More about sounds: Notes

·         Aligning scores and other text: Notes

·         Functions: Write a ticksToTime function that will take a number of ticks and return a string in the form "m:ss".

Homework due Day #8:

·         Program #6: Alien Shooter 2.0 (2 players sequentially, not in parallel).

Day #6. Thursday, 2/06/2020. Functions, shooting bullets

·         .Net videos

·         C# more popular

·         Data analytics and football

·         Final touches to Pong:

o    Add Keyboard input. Notes

·         Shooting bullets. Notes.

Homework due Day #7

·         Program #5: Alien shooter

Day #5. Tuesday, 2/04/2020. Text, sound, splash screens

·         Enhance our 2-player Pong game:

o    Add scores: Strings, Fonts, and Vectors: Notes

o    Add Content: sounds. Notes.

o    Add a splash screen.

Homework due next class:

·         Program #4: Single-player Pong, Enhanced (2.0)

Day #4. Thursday, 1/30/2020. Sprites, collisions

·         Get some content by copying this folder to your desktop: N:\All Courses\Kleen Courses\_MyContent.

·         Writing a Pong program in class: Problem description. Images.

Homework due Tuesday, 2/04/2020 at noon

·         Program #3: One-player Pong. Start from scratch; do NOT try to modify the 2-player Pong program. It'll be more trouble than it's worth.

Day #3. Tuesday, 1/28/019. Game content: sprites & fonts. Arithmetic, timers

·         Timers & game states: Notes

·         Arithmetic: Notes

·         Sprites: Notes

·         Keeping images on the screen: Notes

Homework due Thursday, 1/30/2020

·         Program #2: Catch the bad guy. Use the gamepad to chase images around on the screen.

Day #2. Thursday, 1/23/2020. Gamepad input

Today's program: write a program to randomly set an initial background color, and then continually change (without any abrupt color changes), and allowing user input to stop/start the color changes.

·         Random numbers and type casting: Notes

·         Making decisions: Notes

·         Gamepad input and the if statement: Notes

·         Button presses: Notes

Homework due Tuesday, 1/28/2020. Zip the project (top-level) folder and put the folder in the drop box.

·         Program #1: Color Controller.

Day #1. Tuesday, 1/21/2020. C#, XNA/Monogame, Visual Studio, and colors

·         News: jobs, jobs

·         Today's objectives:

o    Run a C#/Monogame program

o    Change background color using a named color

o    Change background color using R, G, and B variables

o    Set a random starting color

o    Change the color on every tick by incrementing R, G, and B.

o    Data types and type casting

o    The if statement

·         How to become a superstar

·         Programming and C#: Notes

·         What is XNA/Monogame? Notes

·         Setting defaults in C#: Notes

·         Colors on a computer: Notes, List of named colors in C#

Software used in this class

·         You must have a Windows computer for this class.

·         This class requires: Visual Studio 2017, Monogame 3.7, and a C++ program. All are available here: N:\All Courses\Kleen Courses\_2020-Spring-Install-Files. All can be installed on your personal computer.

·         Templates (need to link to them from Tools | Options | Projects and Solutions | Locations | User project templates location. You will need these on your personal computer as well.

·         We will be using the following (free) image editor to create sprites for our programs: Paint.NET

·         We will be using the following (free) sound editor to edit sound files for our programs: Audacity

"Homework" due Thursday

·         If you haven't already done so, buy a game controller from the book store.

·         Download all of the necessary software and install it on your personal computer.

·         Read, print, and sign the Attendance, Test, and Homework Policies.

Interesting articles for programmers:

·         Top jobs, 2020

·         The Joys of the Craft

·         The Urge To Do It All Over Again

 

 

 

 

 

 

 

 

 

 

 

Complete program #8 due Tuesday, 3/26/2020.

2020: Need 3 more days: 4/23, 4/28, 4/30 if there are no snow days.

Final Test

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Videos

 

Misc

Day #21. Tuesday, 4/09/2020: Life

Homework Due Thursday, 4/13/2016 at noon (handed out Day #18—3/30/17 due Day #21—4/13/17)

Homework due Tuesday, 4/25/2017

Day #20. Thursday, 4/06/2017: Lists

 

 

 

Day #25. Thursday, 4/16/2020: Classes

Day #28. Tuesday, 5/01/2020

Homework due at the end of the semester

Final Test. Thursday, May 7, 2020

 

 

Earlier classes are below…

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Day #23. Thursday, 4/12/2017: Classes

Homework due at the end of the semester

Day #24. Tuesday, 4/17/2017: Classes and Frogger

Homework due at the end of the semester

 

 

Tuesday, 1/23/2020. No Class. Snow Day.

 

Tests

Day #29. Thursday, 12/08/2016.