The following are in reverse chronological order.
row 1: Erik K, Nancy, Caitlin, Jack
row 2: Kim, Alex S, Stephanie M, Joe
row 3: Jackie, Drew, Amanda
row 4: Lydia, Stephanie G, Alex C
row 5: John, Kristyn, Erik L, Megan
row 6: Steve, Sarah, Gina, Jason
row 7: Ariele, Nicole, Mike
row 1: Erik K, Nancy, Caitlin, Jack
row 2: Kim, Alex S, Stephanie M, Joe
row 3: Jackie, Drew, Amanda
row 4: Lydia, Stephanie G, Alex C
row 5: John, Kristyn, Erik L, Megan
row 6: Steve, Sarah, Gina, Jason
row 7: Ariele, Nicole, Mike
row 1: Steve, Jackie, Mike, JohnEach group will
row 2: Megan, Sarah, Nancy, Jack
row 3: Alex C, Stephanie G, Gina
row 4: Ariele, Nicole, Caitlin
row 5: Erik K, Erik L, Amanda, Jason
row 6: Kristyn, Drew, Lydia, Stephanie M
row 7: Kim, Joe, Alex S
In mathematics, a perfect number is a positive integer that is the sum of its proper positive divisors, that is, the sum of the positive divisors excluding the number itself. Equivalently, a perfect number is a number that is half the sum of all of its positive divisors (including itself). The first perfect number is 6, because 1, 2, and 3 are its proper positive divisors, and 1 + 2 + 3 = 6. Equivalently, the number 6 is equal to half the sum of all its positive divisors: ( 1 + 2 + 3 + 6 ) / 2 = 6. The next perfect number is 28 = 1 + 2 + 4 + 7 + 14. This is followed by the perfect numbers 496 and 8128.Write an Alice program that will verify whether or not the number entered by the user is perfect (accept only numbers in the range 2 to 10,000 inclusive). Write a Boolean function that calculates whether or not a number (parameter) is perfect.
row 1: Steve, Megan, Alex C, ArieleIntroduce yourselves to you fellow group members! Each of the seven groups (rows) will work together to solve a problem (animate a story) using Alice. You will help each other learn how to solve the problem (animate the story). I expect there to be continuous talking among the members in each group during the whole class period.
row 2: Jackie, Sarah, Stephanie G, Nicole
row 3: Erik K, Kristyn, Kim
row 4: Erik L, Drew, Joe
row 5: Mike, Nancy, Gina
row 6: Caitlin, Amanda, Lydia, Alex S
row 7: John, Jack, Jason
Here are the problems. Each group should decide on an algorithm. Only after deciding on the algorithm should each group start up a single Alice and translate the algorithm into Alice code. No need for lists and/or arrays (Chapter 5) yet. That will come later.
7, -2, 4, 17, -20the maximum is 17 and the minimum is -20.
10, 15, 5, 1, 2, 3, 4, 15, 5, 10, 10, 15, 5, 10, 15The character would say ``2.''
Number sum = 0
Number numberItems = 0
Number oneItem = 0
Number average = 0
numberItems = NumberDialog(Enter the number of items of data to average)
for (index = 0; index < numberItems; index++) {
oneItem = NumberDialog(Please enter the next data item)
sum = sum + oneItem
}
average = sum/numberItems
say(The average is average.toString())
if (distance > 0 && distance <= MAX_DISTANCE) {
// jump
} else {
if (distance <= 0) {
// cannot jump a negative distance
} else {
// cannot jump this far
}
}
Project 5 consists of additional practice doing these Programming Projects at the end of Chapter 3 of the text book.
After debugging your Alice program, print out the code of the final version using the File menu and selecting Export Code for Printing. Before clicking Export, make sure that all the object methods you wrote the code for are checked in their check boxes and that no other object methods (the ones originally there above the ``create new method'' that you did not write the code for) are not checked. Example before checking boxes; example after checking boxes. When you File Export Code for Printing, you will be creating a file named project03.html. Open this file in your favorite browser and print it. Here is an example file.It seems that world methods don't get left out like this.
Is Alice installed on the computers in the Mimosa dorm public lab? Somebody please let me know.
To see of Java is installed on your Windows computer, click Start, select Run, type cmd in the box, and click OK. In the command window that opens up, type java -version. If you see something like ``command not found,'' then visit the Web site http://java.sun.com/. Hover your mouse on the Downloads link, select Java SE, scroll down to Java SE Runtime Environment (JRE), click Download, select Windows for the Platform, check ``I agree,'' and click Continue. Under Available files, click jre-6u16-windows-i586.exe, click Save File, and save the file to your desktop. Once downloaded, double-click the file and start the install process.
home page:
http://elvis.rowan.edu/~hartley/index.html
e-mail:
hartley@elvis.rowan.edu