COW Q2 N6 - Festivus

advertisement

COW Q2 N6

Festivus

Level 1

Festivus Miracle: Everyone gets credit for level 1.

Level 2

Festivus Dinner: Program the method findIngredients. This method takes in a String called foodInStock, and an ArrayList of Strings called ingredients. The method should return an

ArrayList of ingredients that were not found in foodInStock.

Example foodInStock = “tomatopotatocornturkeycarrotstuffing” ingredients = {“potato”, “corn”, “salt”, “chicken”, “turkey”} returns {“salt”, “chicken”}

Level 3

Airing of Grievance: Allow the user to put in complaints using standard input until they put in the phrase “That is all”. If they say that they “hate” something, then say that you hate that same item. If they say that someone “did” something, respond with the phrase “OH NO name didn’t!?!?”. Keep in mind that “I” should be transformed to “you”. If they say “I don’t know what is worse, phrase1 or phrase2

”, respond that one is worse than the other but both are pretty bad. Pick randomly which will be indicated to be worse.

Example

User input: “I hate children” Respond with: “I also hate children”

User input: “Mayewsky did give us homework” Respond with: “OH NO Mayewsky didn’t!?!?”.

User input: “I don’t know what is worse, teachers or administrators” Respond with: “administrators are worse but both are pretty bad”

Level 4

Feats of Strength: Program the paint method in Holiday scene. It should have at least 6 colors, 10 shapes, a jpeg image, and 3 things that change when a key is pressed.

Level 5

Festivus Pole: Program the moveTowers method so that it moves all the rings from pole 1 to either pole 2 or pole3. You can move rings from any pole to any pole but a larger ring cannot be placed on a smaller ring.

Download