Apologies for a mistake in assignment 3 submissions. This was not working for anyone but it has now ben fixed (hopefully) and you should be able to submit now. Please do not email your assignment. Try the submission again. The deadline has been extended so as long as you submit this week, there will be no problem.
Assignment 3 Submission Problems
October 12th, 2009 · No Comments
→ No CommentsTags: Assignment
Week 12 Lab
October 11th, 2009 · No Comments
- Make the shark chase program use a recursive method. Do this by modifying the World.chase method.
- Create a world with two animal objects. Write a recursive method so that the animals count from 1 to 20 with one animal saying the odd numbers and the other animal the even numbers.
- Suppose you have an array (ArrayVisualization) of 10 bugs. Write a method that swaps successive pairs of elements, i.e. the first element with the second, the third with the fourth, etc. You should use a loop and variables to do this.
- Spend a little time filling in the Course/Lecturers CATEI surveys - you should have received an email about it. There are probably many things that can be improved. Remember, these surveys are totally anonymous. Have no fears about stating what you think, just try to make it constructive.
→ No CommentsTags: Lab
Time and location of final exam
October 8th, 2009 · No Comments
The COMP1400 exam will be on Thursday 12 November, 1:45pm - 4:00pm. The location is the Derby Function Room, Randwick Racecourse (access via Northern Movator). View Map
→ No CommentsTags: Exam information
Sample Exam Paper
October 5th, 2009 · No Comments
You can find some sample questions something like what you can expect in the final exam here. The actual exam will have a lot more questions. These are only a few samples.
→ No CommentsTags: Exam information
Week 11 Lab
October 5th, 2009 · No Comments
- Text book Extercise - Modify the WhackAMole game: “One possible modification to the WhackAMole game is to play it until the user has whacked all the moles. To make this adjustment, change the color of a mole in the list to red whenever it is whacked. Allow the mole to be raised only if it is not already red. The game ends when all moles have ben whacked!”
- Dowload the following Alice world. It contains two functions that contain errors. These functions are called mod and listContains. Carefully read the comments at the top of each function that describe their purpose. Test and debug the two functions.
- Write some code that will generate a random permutation of a list.
→ No CommentsTags: Lab
Week 11 and the long weekend
September 30th, 2009 · No Comments
Contrary to previous announcement in lectures, there will be lab exercises for week 11. I was not able to arrange that we skip next week’s lab and extend into week 13. So students who have labs on Monday, will have to do the exercises themselves and show their solutions to their tutors during the Wednesday labs at 11am and 1pm or demonstrate them the following week. You will also be allowed extra time so that if you can’t get all the lab work finished by week 12, we will still accept them the following week.
Sorry for the confusion.
→ No CommentsTags: Lab
Week 10 Lab
September 27th, 2009 · No Comments
- Add a number of objects in a world and place some or all the objects in a list. Next, write a function that counts and returns the number of objects in your list. Use this function to make every object in the list say this number. For example, if your list has 4 objects then all four objects should say “4″.
- Alice is still a developing language, i.e., it still contains bugs. One of these bugs resides in the “contains” function for lists. When you drag a list into a boolean expression (of an If/Else or While) you will have the option of selecting the “contains” function. This function takes two inputs, a list and an object. It should return true if the object is in the list and false otherwise. Most of the time, this function is incorrect - verify this for yourself. Write and test your own Boolean function that determines whether one specific object is contained in a list of objects.
- Start work on Assignment 3. You should have a storyboard by now. If not, develop it during this lab and show your tutor next week.
→ No CommentsTags: Lab
Week 9 Lab
September 20th, 2009 · No Comments
- The following code features nested loops. How many times is the ‘inner loop’ executed? How long does the entire block of code take to execute? What would happen to execution time if the duration for the revolving overall Ferris wheel is changed from 12 seconds to 15 seconds? 10 seconds?

- Give at least one significant difference between the way a Loop statement works and the way a While statement works.
- Exercise: Saloon Sign “An old saloon (Old West) is being converted into a tourist attraction. Use 3D text to create a neon sign to hang on the front of the balcony. Then use a loop to make the sign blink 10 times.”
- Exercise: Frog and Ladybug “Create a world with a frog (Animals) and a ladybug (Animals). Write an interactive program to allow the user to drag the ladybug around the scene. (Use a let the mouse move objects event.) As the lady bug is dragged around, make the frog chase after it by moving one hop at a time without colliding with the ladybug. If the user moves the ladybug within 2 meters of the frog, have the frog look at the camera and say ‘ribbit’ - then end the animation.”
→ No CommentsTags: Lab
Assignment 3
September 20th, 2009 · No Comments
For the 3rd and final assignment, you will design and implement a program for managing phone contacts in Alice.
Requirements
Your program must include:
- A means for adding a phone contact. You can assume that a phone contact consists of two strings: aname and a number (stored as a string since you cannot have leading 0’s in a number).
- A means for searching the number of a contact, i.e., the user enters a name and your program displays the corresponding number.
- A means for deleting a contact when a user enters a name.
Optional pair work
For this assignment you have the option of working by yourself or with one partner. Use your imagination to make this seemingly boring application as interesting as possible, while still meeting the requirements above.
Marking
Marks are distributed as follows:
- Design presentation: 20%
- Your design will now need to include flowcharting to indicate the different possible directions the control flow may take. It will also include a short user manual describing what your program does and how to use it.
- Implementation: 50%
- Implementation marks will be based on the correctness of your code and organisation of your methods. Methods should make sense as units of code and not just be a random collection of lines. Marks will also be awarded for virtuosity and additions you make above the basic specification.
- Code readability: 30%
- Clear and concise commenting
- Meaningful naming of methods and objects
- Avoiding “magic numbers”
Readability marks are given for:
→ No CommentsTags: Assignment
Flow charts and pseudo code
September 14th, 2009 · No Comments
When you present your designs for the assignment you may use either flow charts or pseudo code. Pseudo code is often easier to write and understand.
→ No CommentsTags: Assignment