Specification of Assignment

Refresh this page constantly as we answer your questions from Piazza and clarify the requirements

The specifications for this assignment are given in this video.

The URLs to the images are:

  • https://profdiazh.github.io/cs101/static_files/assignments/10_animal_game/species.png
  • https://profdiazh.github.io/cs101/static_files/assignments/10_animal_game/cow.png
  • https://profdiazh.github.io/cs101/static_files/assignments/10_animal_game/frog.png
  • https://profdiazh.github.io/cs101/static_files/assignments/10_animal_game/penguin.png
  • https://profdiazh.github.io/cs101/static_files/assignments/10_animal_game/puffer_fish.png
  • https://profdiazh.github.io/cs101/static_files/assignments/10_animal_game/echidna.png
  • https://profdiazh.github.io/cs101/static_files/assignments/10_animal_game/eagle.png
  • https://profdiazh.github.io/cs101/static_files/assignments/10_animal_game/kangaroo.png
  • https://profdiazh.github.io/cs101/static_files/assignments/10_animal_game/platypus.png

Disclosure: The images and decision tree for this assignment are property of grok academy

This is the decision tree that you should use to write the questions that your program will ask the player:

Use the following code as a template for the screens with questions:

void setup() {
  size(800, 500);
  background(255); 
  textAlign(CENTER, CENTER);
}

void draw() {
  fill(0);
  textSize(30);
  text("WRITE YOUR QUESTION HERE", width / 2, height / 2 - 50);
  
  // Draw the "Yes" and "No" rectangles
  fill(255);
  stroke(0);
  rect(width / 2 - 120, height / 2, 100, 50);
  rect(width / 2 + 20, height / 2, 100, 50);  
  fill(0);
  textSize(22);
  text("Yes", width / 2 - 70, height / 2 + 25);
  text("No", width / 2 + 70, height / 2 + 25);  
}

Name the file animal_game.pde.

Grading Rubric

Points Requirement
2 Name the file correctly (autograder).
4 Style ((Header, Comments, Spaces, camelCase)
6 The First screen shows all the species and changes when pressing any key
4 The first question (“Has fur”?) is shown on the second screen and pressing the ‘y’ key shows the left question (“Lays eggs?”)
4 Pressing the ‘n’ key on the second screen shows the left question (“Has feathers?”)
24 The eight animals can be properly guessed

You must use the provided templates to receive a grade on the assignment. You must use the URLs instead of a local file for us to be able to grade the assignment.