170 likes | 181 Views
Join our summer training on computer science to learn advanced programming skills. Explore topics such as string and number calculations, decision structures, and advanced programming techniques. Develop your own casino game, create a gas station pump simulator, solve a maze problem, and more. Don't miss this opportunity to enhance your computer science skills!
E N D
Summer Training on Computer Science 2008 Tracy Clark Department of Prof. & Secondary Ed. West Chester University West Chester, PA 19383 tclark@wcupa.edu Zhen Jiang Department of Computer Science West Chester University West Chester, PA 19383 zjiang@wcupa.edu URL: www.cs.wcupa.edu/~zjiang 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 • <1,2,3> or <4,5,6> • 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 • 1-2-3 • Lunch time • Practice time • Your 3-5-7 • 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 1 0 1 1 0/1 Open / Blocked 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 Can this mouse get the cheese? 0 1 0 1 Summer Training on Computer Science, WCU
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!
Day 4: Advanced Programming • The cube with the smaller label gets visit first! 15 x 14 x x 13 12 11 10 9 x x 8 x 7 6 5 4 x 3 2 x 1 x 0 Summer Training on Computer Science, WCU
Day 4: Advanced Programming 0 0 1 1 0 1 1 0 0 0 0 0 0 1 0 1 0 Can this mouse find the shortest path? 0 1 1 1 0 0 0 0 0 0 0 Summer Training on Computer Science, WCU
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!
Day 4: Advanced Programming Create the graph table 6 p x x 1 x x 5 p 3 0 p p p x 4 x p p x 7 x x p p p 2 p p p Summer Training on Computer Science, WCU
Day 4: Advanced Programming 0->1: 1 0->2: 7 0->3: 1 1->0: 1 2->0: 7 2->5: 6 2->7: 1 3->0: 1 3->4: 1 3->5: 2 4->3: 1 5->2: 6 5->3: 2 5->6: 2 6->5: 2 7->2: 1
Day 5: Advanced Programming • Student presentations • Lunch time • Practice time 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
Thank you! Summer Training on Computer Science, WCU