Computer Math Sample questions and problems to be solved while receiving an introduction of the Java programming language Can you write ONE set of directions that allows you to get out of any maze? Given a 5-gallon and 3-gallon bucket and with an unlimited water supply, how can you fill up exactly 4-gallons of water? 5-Gallons 3-Gallons Second Semester: Learn to program basic graphic and animated scenes using shapes and lines. Basic Animation: Get the smaller red dots to move around the screen randomly and bounce off the bigger black dot when they make contact. AP Computer Science Sample topics and programs to be written during the second year studying the Java programming language. Write a program to determine if a given year is a “Leap Year” A year is a leap year if it is divisible by 4, unless it is also divisible by 100 but not 400 Any year before 1582 is not a leap year Examples: 2003 is not a leap year (not divisible by 4) 1900 is not a leap year (it’s divisible by 100) 2004 is a leap year Translate a word into “Pig Latin” Example: “school” becomes “ool-schay” Create an object called a “Die” Example: Create a “Pair of Dice” and play the game “Yahtzee” Example: Create a “Pair of Dice” and play the game “Shut the Box” Use Arrays to store similar information to create a Deck of Cards. Example: Use the Deck of Cards to simulate the card game “War” Example: Use the Deck of Cards and make a the game “Blackjack” Use and create formulas to calculate measurements. Example: Write a program to use the Distance Formula: d ( x2 x1 )2 ( y2 y1 )2 Java: distance = Math.sqrt( Math.pow(x2 – x1 , 2) + Math.pow(y2 – y1 , 2) ); Create a the game Tic-Tac-Toe using 2-Dimensional Arrays Use recursion to find patterns Example: The Fibonacci Sequence (1, 1, 2, 3, 5, 8, 13, 21, …) Example: Solve the Towers of Hanoi puzzle You can only move 1 disk at a time You cannot place a larger disk on top of a smaller disk All disks must be on some peg except for the disk being moved between pegs The Towers of Hanoi Types of Students to Target for Computer Math / Computer Science Computer Math Students enrolling in Algebra II w/ Trig, Math Analysis, Advanced Algebra and Pre-calculus, Calculus Students with no programming experience Students who like puzzles & brain teasers First day of class activities: o Write a set of directions to make a Peanut and Butter Sandwich o Write a set of directions to make a Paper Airplane Students who think “Outside the Box” Students who can understand and solve word problems in math class Students who are driven to work on their own and try new things beyond the given assignment Students who are interested in going into a Math, Science, Engineering, Physics, Video Game Design, Art Design Would prefer sophomores and juniors to only enroll in Computer Math Some Characteristics of Computer Math Students Who Have Struggled Some students dual enrolled in Algebra II with weak critical thinking skills Students who complete homework just to get the points or copy other students’ Problem Sets (graded homework assignments) just to get the points instead of using it to learn the material Students who only do the bare minimum Jumping Straight to AP Computer Science Must talk with AP Computer Science teacher Should have previous programming experience o Some programming languages are: Java, C++, Visual Basic, Python o Programming formulas or games on their calculator o Creating apps for Android or iPhones/iPads Would prefer to be a senior (younger students can learn the foundations in Computer Math) Should be an extremely strong student in Calculus Willing to do work in the summer to learn some basics of Java programming