September 13th, 2009 · No Comments
As with assignment 1, there will be two phases to your submission of assignment 2:
- Designs must be presented in the week 8 lab and hard-copies of your flowcharts given to your tutor.
- Final implementation is due at the end of week 8 (Midnight Sunday 20 Sept)
You must submit your assignments online using the online ‘give‘ page. You need to submit three files:
- Your Alice world, an .a2w file.
- Your code, exported as HTML
- An Alice class file (.a2c) containing the class you created.
Only one member of each pair needs to submit these files.
Make sure you try to submit early, in case there are any more problems with the web interface. Submitting during lab time is a good idea, so your tutor can help if there are problems.
Tags: Uncategorized
September 13th, 2009 · No Comments
- Present your Assignment 2 storyboards.
- Evaluate (give the value of) each of the following expressions:
- 3 < 5
- true == false
- 10 >= 10
- true and false
- not ( both 3 < 5 and 10 >= 10)
- Which of the expressions in question 2 (above) is considered a logical expression? Give a reason for your choice.
- Exercise 6-10 Flying Between Two Trees. “Create a world with a lichenZenspider (Fantasy/Fairies) between two trees (Nature). Animate the lichenZenspider flying back and forth between the two trees. Make the world interactive so that lichenZenspider flies forward a short distance each time the user presses the enter key. LichenZenspider should move forward until she reaches a tree, then turn around to fly back to the other tree. When she gets to the second tree, she should turn around to fly back toware the first tree. Be sure to avoid lichenZenspider’s colliding with a tree.
- Project 1. Gatekeeper.
Tags: Lab
- Describe a significant difference between a movie animation and aninteractive animation in terms of control of flow.
- In Alice’s drag and drop interface, relational operations are listed as part of the World’s built-in functions. Give a reason for making relational operations world-level, rather than class-level.
- Why is a function required to have a return statement whereas a method does not?
- Can a function be called from within another function? Either way, explain your answer.
- Textbook exercise 6-3 Bee Scout: “It has been a hot, dry summer and a hive a bees is in desperate need of a new supply of pollen. One bee (Animal/Bugs) has ventured far from the hive to scout for new pollen sources. A natural place to look is near ponds in the area. Set up an initial scene with a circle (Shapes) flat on the ground and colored blue to look like a pond. Add plants, trees, and other natural scenery including some flowers (Nature). Be sure the bee is located somewhere around the edge of the pond… Write a program to animate the bee scouting the edge of a pond for flowers that are in bloom. The bee is to fly around the perimeter of the pond (circle). Write a method to move the bee scout around the perimeter of the pond in which the circumference of the circle is used to guide the motion… Write a function that computes and returns the circumference of the circle. Then have the bee fly around the perimeter of the pond by moving forward the amount of meters returned by the circumference function while turning left one revolution.
Tags: Lab
For your second assignment, you will work in pairs to design and create an interactive game.
Requirements
Your program must include:
- At least one user-defined class with 2 or more instances in the world.
- At least 1 user-defined function with parameters (class-level and/or world-level).
- At least 2 events with different handlers.
Pair work
Choose your partner in your Week 7 tutorial. It is better if you can partner with someone else from your tut, but this is not strictly necessary.
Both partners need to contribute to the design and implementation. Comment your methods and functions with the name of the principle author of each. We would expect about equal contributions from each of you.
Both members of your pair will receive the same mark (except in the event of a major conflict).
Marking
As in the previous assignment, marks are distributed as:
- Design presentation: 30%
- Your design will now need to include pseudo code to indicate the different possible directions the control flow may take.
- Implementation: 40%
- 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.
- Code readability: 30%
Readability marks are given for:
- Clear and concise commenting
- Meaningful naming of methods and objects
- Avoiding “magic numbers”
Tags: Uncategorized
Exercises from the textbook:
- Chapter 5 Ex 7 — Ninja motion
- When you have completed this, change the ‘When key is typed’ events to ‘While key is pressed’ (by right clicking on the event and selecting ‘change to…’). Make the actions happen at the beginning of the keypress rather than at the end. Can you make the ninja duck as long as the key is pressed and stand up when it is released?
- Chapter 5, Ex 14 — Penguin Slide
- When this is done, try adding ‘let arrow-key move pond’ to the events. Does your code still work if you move the pond? What if the pond moved while the penguin is sliding?
Tags: Lab
For assignment 1 you need to submit 2 files: an Alice world (.a2w) file and a HTML (.html) file. The HTML file should be generated using “Export Code For Printing…” under the File menu in Alice. This will allow us to hand-mark your code and give you feedback.
When you are ready to submit your assignment go to the submission page. Type ” COMP1400 ” for the course option and hit “Search For Assignments”. Here is a screen shot of the window.
After you hit “Search For Assignments” you should see the upload window.
Now submit your files. Firstly, read and accept the declaration. Next, select the files to submit as your assignment. To upload a second file hit “Choose another…”. If you everything properly you will see a success window.
You can submit as many time as you want. We will mark the last submission. Submitting early and often ensures that if anything goes wrong, you will at least have something for us to mark.
Tags: Assignment
Do the following exercises from the textbook:
Chapter 3 Exercise 4 — Volleyball Jump
Chapter 3 Exercise 7 — Snowman to Stool
Chapter 4 Exercise 10 — Lock Combination
Tags: Lab
The main task of this week’s lab is to present your storyboards for assignment 1. We will be collecting copies of your storyboards, so please have paper versions available.
Remember that a storyboard has both pictures and text. You should have a short description of what each (active) object is doing in each scene.
Once everyone has finished presenting, you can use the rest of the lab to work on your assignment or to catch up on previous lab work.
Tags: Lab
Design and program an animated scene based around a dinosaur world. The scene can show anything you like, as long as your program satisfies the following criteria:
- It is at least 30 seconds long
- It contains at least 3 moving objects
- Two or more objects must move simultaneously
- At least one object moves its subparts.
- Your program must use at least 2 methods (other than World.myFirstMethod).
Submission
- You will need to present a storyboard of your design in the Week 4 lab.
- Your full implementation will be due at the end of Week 5.
Instructions for online submission will follow.
Marks
Design presentation: 30%
A good design will include both pictures and a concise description of the action that takes place in each scene.
Implementation: 40%
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.
Code readability: 30%
Readability marks are given for:
- Clear and concise commenting
- Meaningful naming of methods and objects
- Avoiding “magic numbers”
Tags: Assignment
Do the following exercises from the textbook and show your code to the tutor:
- Circling Fish, Ch 2 Ex 4
- Magnet Fun, Ch 2 Ex 6
- Helicopter Flight, Ch 4 Ex 4
Use methods where appropriate. Make sure you add comments to your code to explain any unclear parts.
Tags: Lab