Summer Training on Computer Science, WCU Summer Training on Computer Science 2008 Zhen Jiang Department of Computer Science West Chester University West Chester, PA URL: Tracy Clark Department of Prof. & Secondary Ed. West Chester University West Chester, PA
Summer Training on Computer Science, WCU Outline Introduction Advanced programming Conclusion
Summer Training on Computer Science, WCU Day 1: Introduction Introduce yourself and know each other in class. Share the programming experience String, number Calculation (1+1 ≠ “1”+”1”) Decision structure If block Condition Select case block (multiple choices) Grading system
Summer Training on Computer Science, WCU Day 1: Introduction Lunch time Random number Rolling a dice (randomize, rand) Your own casino game $10 initially Bet +$1, +$2, +$5, +$10, +All or Win/lost End
Summer Training on Computer Science, WCU Day 2: Advanced Programming Timer Gas station pump Lunch time Practice time You own gas station? Select the type: Regular 87, Mid-grade 93, and Premium 95 Start the pump and run the digits Stop and display the price Background images
Summer Training on Computer Science, WCU Day 3: Advanced Programming Lunch time Practice time Your Array undo
Summer Training on Computer Science, WCU Day 4: Advanced Programming Maze
Summer Training on Computer Science, WCU Day 4: Advanced Programming Cube/Room 0/1Open / Blocked
Day 4: Advanced Programming Depth first search Idea Starting from the start point, For each current position, visit one of its unvisited neighbors. Otherwise, backtracking. Let’s try it!
Summer Training on Computer Science, WCU Day 4: Advanced Programming 15 x 14 x x x x 8 x x 3 2 x 1 x 0 The cube with the smaller label gets visit first!
Summer Training on Computer Science, WCU Day 4: Advanced Programming
Day 4: Advanced Programming Shortest path Idea Two groups: visited and unvisited For each visited position, save the information of the distance (to the start point). Visit the closest unvisited position. Let’s try it!
Summer Training on Computer Science, WCU Day 4: Advanced Programming 6 p x x 1x x 5 p 3 0 p p p x 4 x p p x 7 x x p p p 2 p p p
Day 4: Advanced Programming 0->1: 1 0->2: 7 0->3: 1 1->0: 12->0: 7 2->5: 6 2->7: 1 3->0: 1 3->4: 1 3->5: 2 4->3: 15->2: 6 5->3: 2 5->6: 2 6->5: 27->2: 1
Summer Training on Computer Science, WCU Student presentations Lunch time Practice time Day 5: Advanced Programming
Summer Training on Computer Science, WCU Day 5: Conclusion 1 Computer Language used 2 instructors 5 days’ full time training 6 projects 8 program demonstrations ? student presentations 8 programs developed for each student ? (out of ?) is the grade of this course given by all students
Summer Training on Computer Science, WCU