StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Programming and Design with Alice - Assignment Example

Cite this document
Summary
Alice is a 3D interactive animation environment that offers a visual representation of a program state in an animated small world. This paper "Programming and Design with Alice" explains the process of developing an animation of a cat chasing a mouse…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER92.4% of users find it useful
Programming and Design with Alice
Read Text Preview

Extract of sample "Programming and Design with Alice"

The following is the design process.

            The first design using pseudocode is very simple: step up and step down so that the mouse and cat legs move up and down. This does not work because we have not yet defined the movement.

Front right leg up

Front left leg down

Back left leg up

Back right leg down

            Alice does not have primitive methods to perform the front left leg up and the front left leg down. It is therefore required that the code for this movement be designed. Elegant design requires that methods are kept from being too large. To maintain a small size for the methods, additional methods are added to do the small tasks. The following is done

Call the frontRightLegUp function

Do together

Call the frontLeftLegUp function

Call the frontRightLegDown function

            Now the next step is to order this movement

Do together

Front left leg up

Front right leg down

Do together

Back left leg up

Back right leg down

The final storyboard is as follows

Do together

A cat sits on the floor.

The mouse sits beside the cat

Do in order

The cat turns around and notices the mouse

The mouse looks back at the cat

The mouse takes one step ahead of the cat

The cat follows the cat

The mouse always makes one step ahead of the cat

            A loop is implemented at the point where the mouse takes a step ahead of the mouse. This loop ensures that whenever the mouse takes a step the cat takes another step of the same magnitude so that the mouse is always one step ahead of the cat.

 

            The next step is transforming the storyboard into program code. The first action of the storyboard is the mouse turns to see the cat. The first method, therefore, turns to face. We use the turn-to-face to make the mouse turn to look in the direction of the cat. The next step is the cat taking one step away from the cat. We use the move-away method.

            Alice contains control statements that are vital in controlling movements. In the cat chase program, the cat moves away from the cat while the cat moves towards the mouse. The control statement Do in order is used to tell Alice to first make the cat look at the mouse and the mouse move away from the cat.   

            Other actions must be done together.  When the front right leg is up, for example, the front left leg must be held down. To achieve this functionality Alice is told to Do these actions together through the DO together control statement.

           To implement this program into Alice a scene must first be created. The initial scene is a room (Farooq, 2012). The intention of the cat is to catch the mouse. It should follow it while the mouse should always be one step ahead of the cat. We select the room scene and then a cat and a mouse.

           The next stage is in the program code editor. The code that makes the program is written. In Alice, the program code editor is at the bottom right of the main window. The instructions are edited in the area labeled World. my first method which can be renamed to anything of the programmer’s liking. Since the cat chase program is so simple it can be programmed in just one method. The first pair of the code is inserted in the Do in order block. In the cat’s methods, there is a turn-to-face method that is selected and dragged to the Do in order block. This method requires an argument i.e. the object that the cat should turn to face. The mouse is then picked as the object to be faced. The next method is to move away from where the mouse moves away from the cat. Lastly, the cat moves towards the mouse. 

The program is executed by pressing the play button.

Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Programming with Alice Assignment Example | Topics and Well Written Essays - 750 words”, n.d.)
Programming with Alice Assignment Example | Topics and Well Written Essays - 750 words. Retrieved from https://studentshare.org/logic-programming/1679943-programming-with-alice
(Programming With Alice Assignment Example | Topics and Well Written Essays - 750 Words)
Programming With Alice Assignment Example | Topics and Well Written Essays - 750 Words. https://studentshare.org/logic-programming/1679943-programming-with-alice.
“Programming With Alice Assignment Example | Topics and Well Written Essays - 750 Words”, n.d. https://studentshare.org/logic-programming/1679943-programming-with-alice.
  • Cited: 0 times

CHECK THESE SAMPLES OF Programming and Design with Alice

Report for Advance Software Engineering for Stage Two

As compared to the agile programming approach I found 'design Pattern' to be more complicated, interesting and powerful software design technique as a learner.... A design pattern introduced by the gang of four is an incredible way to structure the application design for extensions, flexibility and more towards a generic design.... Including pair programming, concept of incremental approach, setting a leader for discussion/advice/decision and a 4 minute 'chat meeting' on daily basis....
4 Pages (1000 words) Essay

Object Oriented Programming

This research paper talks about the object oriented programming paradigm, its main concepts and principles (encapsulation, polymorphism, abstraction, dynamic binding and message passing) and how the paradigm may be applied to computer software or computer applications design.... The research paper "Object Oriented Programming" talks about main concepts and principles of the object oriented programming paradigm and about its application to computer software or computer applications design....
7 Pages (1750 words) Research Paper

Agile Software Development

The traditional approach to software development involves the 'definition of requirements which leads to the architecture or design of the development process and implementation' (Dean and Gravel, 2009 p12).... This dissertation "Agile Software Development" critiques approaches and methods and evaluates them in relation to relevant issues and matters that define each of them....
25 Pages (6250 words) Dissertation

Principles of Detail Design

Detailed design acts as a bridge between design and code in the same way that architecture provides a link between requirements and design.... In view of these reasons, detailed design has to assume the role of gatekeeper to ensure that the specification and design of the system are sufficiently completed even before construction begins.... Name: Instructor: Principles of Detail design design is the process of creativity that allows for solutions to implementing all of the customer's requirements; and thus is the resulting plan....
3 Pages (750 words) Essay

Alice A 3D Graphical Programming environmet to teach algorithm development and control structures

This paper is about use of an animated graphics tool, namely alice, to teach C++ programming.... alice, developed by the Carnegie Mellon University, is one such tool.... Users can program alice using drag-and-drop based interface to animate objects in a virtual world.... alice is a friendly programming environment for novice programmers offering actions, named instructions, functions, control structures and event-driven programming....
3 Pages (750 words) Essay

Programming a Lego Mindstorm Robot

To facilitate the programming of the kit, a programming language referred to as NXT has been developed by LEGO.... This programming language gives everyone the ability to possess full control of the Lego Mindstorm Kit (Valk).... The use of this programming language if efficient even for people who lack programming language skills.... his project is aimed at constructing a programming a robot that has the ability to pick balls from the ground, carry the ball for at least one meter following a black line drawn on the ground and place the ball in a container 0....
5 Pages (1250 words) Essay

Computer Programming Techniques

The following are the guidelines recommends when carrying out the designing program tests: design the test cases to make sure that all the specification identifies in the analysis are documented in a single or multiple test case.... The author of the paper "Computer programming Techniques" concerns a clear outline to the users of the program on technical problems solved, variables, and constants that they deal with, the guidelines recommend when carrying out the designing program tests, modern engineering practice description....
6 Pages (1500 words) Assignment

Programming Team Methodologies

This research will begin with the statement that software development methodologies are important for programming teams that are keen to make sure there is good information flow system, and the team also develops.... This research tells that the decisions on which approach is important in most cases depend on the type of programming teams that the business firms use.... programming is an important area of any organization that is determined to become successful in its operations....
9 Pages (2250 words) Coursework
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us