In CS, taught by Ms. Taricco, we learn how to use HTML and CSS to create our own personal websites (click here to view the websites of other Mass Academy students). We have also been learning Java through notes, exercises, and labs, which align with the curriculum of Advanced Placement Computer Science A. Later in the school year, we will be creating apps to help others (Apps for Good).
The program to the left randomly generates a number from 1-20 inclusive and prompts the user to guess it, outputting the number of guesses it took to guess correctly. This is an example of an exercise we did while learning about for and while loops. Below (or in a new tab) is an example of what could happen while running the program. Click here to view the PDF (left) in a new tab.
This program took me very long to write, because it involved a lot of logic and math relating to sine and cosine in order to generate the coordinates of the points of a star using a loop. After a lot of trial and error, I was able to create a program that can draw 10 stars that have an inputed number of points. So far, I have tested this program with 5-pointed stars, 9-pointed stars, and 15-pointed stars, and the resulting Applets are displayed.