CIS 3100 Introduction to Programming Using Virtual Reality

Exercises 1 it can be very difficult for people to

Info icon This preview shows pages 36–38. Sign up to view the full content.

View Full Document Right Arrow Icon
Exercises 1. It can be very difficult for people to write clear and complete algorithms, such as a set of directions. We often take things for granted when writing directions and use our intelligence to interpret poorly written directions. For example, directions often contain clauses like “turn left at the third red light.” But what if one of the lights is green? Does it count? Would a person even ask this question, or just make an assumption about what the writer meant? How would a computerized robot handle such a problem? Try writing a detailed set of directions for a simple every day process, such a s making a pot of coffee, then exchange your directions with another student. Critique each other’s directions to see if they are clear and complete. Did the writer make assumptions that caused steps to be left out of the algorithm? 2. Email the HTML Web page that you saved with the code for your world to someone, such as your teacher or another person who will be impressed that you are beginning to learn three- dimensional, interactive, virtual reality programming with modern high-speed digital electronic computers. It might be best to send it as an attachment to a message.
Image of page 36

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Alice – Chapter 1 DRAFT June 10, 2013 pg. 37 of 38 3. Open the hello world Alice world that you saved as part of tutorial 1C, and add some additional animation to the world. You may want to experiment with the methods to make the bunny move, turn, and roll. See if you can do the following: a. Make the bunny jump up and down. b. Make the bunny jump up, turn 1 revolution, and then land. c. Make the bunny jump up, roll 1 revolution, and then land. d. Make the bunny move and turn several times to go around in a full circle (or polygon). What is the difference between turn and roll? What difference does it make if you change the order of instructions in a particular world? When you are finished, look at World Statistics on the Tools menu and see how long your Alice world has been open. 4. The methods available for the bunny class of objects are called “primitive methods” and are available for all Alice objects. Certain classes of objects, such as the Penguin Class, have additional methods available. Try starting a new world with a penguin and experiment with some of its non primitive methods, such as wing_flap, glide, jump, jumping, walk and walking . 5. Try creating, playing and saving another Alice world on your own. Two pieces of advice – a. Follow McGinley’s Rule for New Programmers: K.I.S.S. — Keep it Small and Simple. You should be encouraged to experiment, but be careful about getting in over your head. Try a few simple things with only a few objects to get started. b. Try to plan what you will do in the world before you start working on it. Keep in mind the Rule of the Six P’s: Proper Prior Planning Prevents Poor Performance. Many developers of Alice worlds like to outline or storyboard their work first. They draw a series of a few simple sketches of what they would like to try to make the objects in the world do. Professional programmers also use pseudo-code and flowcharts, which you will learn about in later chapters, to design the algorithms that methods will follow.
Image of page 37
Image of page 38
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern