answersLogoWhite

0

How do you write method in Alice programming?

Updated: 8/11/2023
User Avatar

Questions101girl

Lvl 1
13y ago

Best Answer

Alice is an innovative 3D programming environment that makes it easy to create an animation for telling a story, playing an interactive game, or a video to share on the web. Alice is a freely available teaching tool designed to be a student's first exposure to object-oriented programming. It allows students to learn fundamental programming concepts in the context of creating animated movies and simple Video Games. In Alice, 3-D objects (e.g., people, animals, and vehicles) populate a virtual world and students create a program to animate the objects.

In Alice's interactive interface, students drag and drop graphic tiles to create a program, where the instructions correspond to standard statements in a production oriented programming language, such as Java, C++, and C#. Alice allows students to immediately see how their animation programs run, enabling them to easily understand the relationship between the programming statements and the behavior of objects in their animation. By manipulating the objects in their virtual world, students gain experience with all the programming constructs typically taught in an introductory programming course.

Primitive methods in Alice 2.0
  1. move(direction,amount)
  2. turn(direction,amount)
  3. roll(direction,amount)
  4. resize(amount)
  5. say(what)
  6. think(what)
  7. playSound(sound)
  8. moveTo(asSeenBy)
  9. moveToward(target,amount)
  10. moveAwayFrom(target,amount)
  11. orientTo(asSeenBy)
  12. turnToFace(target)
  13. pointAt(target)
  14. setPointOfView(asSeenBy)
  15. setPose(pose)
  16. standUp()
  17. moveAtSpeed(direction,speed)
  18. turnAtSpeed(direction,speed)
  19. rollAtSpeed(direction,speed)
  20. constrainToPointAt(target)

Methods in Alice

Methods in Alice can exist at either the world level or at the class (object) level. The closest analogy that I can draw to more conventional programming languages such as Java is that world-level methods are sort of like class methods in Java while class-level methods are definitely like instance methods in Java.

For this program, I defined two additional methods at the world level named:

  1. setTheStage
  2. playTheShow

As the names imply, the purpose of the first method is to get everything ready for the show and the second method actually presents the show. As you can see, the code in Listing 2 calls these two methods in sequence.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

You just click create a new method

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write method in Alice programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What does primitive method mean in programming?

All the objects in Alice that have a set of common set of built-in methods for performing basic options.


What is the meaning of a method in Java programming?

a method is a variable


What are some good sites to learn computer programming?

alice and java


How is event driven programming different from other programming?

write a note on event driven programming


Can you write multiple Mains in C-Sharp programming?

No. There can only be one main method, however you can declare new methods, and call them from the main method. Or you can use multi-threading, to simulate having multiple main methods.


What is method in programming language?

A method is another name for a function. (I am assuming you know what a function is)


How programming language is useful in system programming?

Without programming languages you couldn't write (system) programs.


What a world-level method in Alice programming?

Alice methods are either world-level or class-level. Class-level methods operate upon a single character while world-level methods operate upon characters that interact with each other, such as when two characters are conversing with one another.


What are the 2 major computational method of linear programming?

Simplex Method and Interior Point Methods


What is initgraph in computer graphics?

The initgraph() is a method that you always use when you want to write graphic programming in C++. It is used to initial graphi window before something can be drawn on the window.


Is quick sort is an example of dynamic programming algorithm?

quick sort is a divide and conquer method , it is not dynamic programming


What is the difference between linear programming and nonlinear programming?

LPP deals with solving problems which are linear . ex: simlpex method, big m method, revised simplex, dual simplex. NLPP deals with non linear equations ex: newton's method, powells method, steepest decent method