

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Handouts for three different java programs from the cs106a course at stanford university. The first program, rolldice.java, simulates rolling multiple dice until the maximal value is rolled. The second program, colorchangingsquare.java, displays a square that changes color randomly every second. The third program, piapproximation.java, approximates the value of pi using monte carlo integration by simulating the throwing of darts at a virtual dartboard.
Typology: Exercises
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Portions of this handout by Eric Roberts /*