# Alice Unit 5 [Objects, Parameters]

5.1: Exercise Competition:

Three girls Jenny, Kelly, and Barb are enrolled in an exercise class. One day after class the three decide to have a friendly competition to see how many sets of 10 repetitions of running in place each can do before getting tired. Barb decides to go first and gets tired at 10 repetitions. Kelly goes next and she gets tired at 20 repetitions. Jenny, who has been in the exercise class for the longest, goes next. She gets tired at 30 repetitions.

Create a world that suites the competition.

• Note: Basically, you are just using a parameter to determine how many times the girl “runsInPlace”
• Important: Each of the girls should be an instance of `ExerciseGirl `class that you created in chapter 5.

EACH Assignment below requires the use of a parameter in some way.  If you do not have a parameter, as described, you will lose a lot of credit.

Here is a helpful link on how to create and use parameters, in case you forget.

## 5.2 : Jumping Jacks

Add a `jumpingJack` method to the `ExerciseGirl` class. The method should make the object perform jumping jacks .

• Important: this method should have a parameter for the number of repetitions to perform.

## 5.3 : Marcello The Magician:

Marcello the magician has finally mastered his disappearing act. To perform the act, he places several items on a table in front of him. He stands with his right arm extended over an item. He says the magic word “Alakazam, Alakazee” and the object disappears. He repeats this procedure for each object on the table. Create a world in which Marcello (an instance of the Magician class from the People Collection) demonstrates his new act . In the magician object

• you should create two new class-level methods:
• `sayMagicWords`
• should cause Marcello to say the magic words.
• `makeDisappear`
• This method should have an object as its parameter
• should cause Marcello to turn to face the object, say the magic words (by calling the sayMagicWords method) and then make the object disappear by setting its opacity to zero (note: for some reason the bunny object cannot be made to disappear this way!).
• gigantaicize
• This method should have an object as its parameter
• the object should be made to 5 times its original size!
• Want to get an “A+”: then create a transmute method tha
• takes an object  parameter
• Changes a locust to a boar (hide the one , make the other appear)
• changes a bird to a locust

Prior Version

# Rock Paper Scissors Part IV [Alice 2]

We are going to create a variable numWins  to keep track of how many times the user correctly beats the cpu.

1. create a variable numWins  to keep track of how many times the user correctly beats the cpu

1.  Every time that the user wins increment the variable by adding 1 on to that variable.

This is how you increase the value of  a variable by 1.

1. Repeat this step for each in which the user wins.
2. At the end of each round, tell the user how many times they won. (Remember that numWins  is a number so you must use what as a string to say it)

# Alice Boolean Logic

Alice Supports Several Boolean Logic types. They exist under the world functions :

# Rock Paper Scissors Part III [Alice 2]

In the Part 2, we ended with a dilemma. If the user wants to play a second game, we need hide the objects that were chosen in the first game!

1. So, at the start of the main while  loop, you should programmatically set the isShowing  of all 6 objects to false.

Note: all commands in alice have a duration.  Since we want all 6 objects to immediately hide, s et the duration to 0 by clicking on more and selection duration as shown below:

So, now you should have a fully functional Rock, Paper, Scissors Game that should work similar to what you can see below  (Still, there are some improvements that could be made ,see the bottom).

However, there are some improvements that we should make.

# Shark Tank Ethics Episodes

Responsible Companies

•  Season 4 , episode 17  @ 28:30 link
• seconds Proof eyewear
-eco friendly eye wear, towards the end of episode..
• Season 3 Episode episode 15 @ 8:00 link
Socially responsible company at approx 10 minutes (remax recycleable shoes)