![]() One-shot procedures are available in the Code editor, while procedures are available in the Scene editor. One-shot procedures are only available for acting objects, while procedures are available for all objects. Refer to Section 2 Lesson 6 1In 1.Alice, how is a oneshot procedu re differen t from procedu res in the Code editor? (Choose all correct answers) A biped object walking. Which of the following actions would require a control statement to control animation timing? In Alice, the setVehicle procedure will associate one object to another. In Alice, Do In Order and Do Together:Īre move statements Are control statements (*) Are complex statements None of the above Correct 9. The Alice IF control structure requires the false statement to be populated. Correct 6.If you want one message to display if a user is below the age of 18 and aĭifferent message to display if the user is 18 or older, what type of construct would you use? for all loop do loop while loop if (*) Incorrect. (*) The condition loopVal < 5 returns a boolean value. The condition loopVal < 5 is tested after the block is executed. The variable loopVal is initialized to 0. The message "Printing Some Text" will be printed until loopVal is no longer less than 5. 5Which of the following statements about what happens when the. GetObject getDuration getDepth getDistance (*) Incorrect. 4In Alice, which function is used to move an object directly to the center. Visual storyboard Flowchart (*) Pie chart Scene editor Class chart The clownFish class and Swimmer class ClownFish class (*) The pajamaFish class, clownFish class, and Swimmer class Any class with "Fish" in the class name Correct 3From your Alice lessons, which of the following is a tool to show the. True (*) False Correct 2In Alice, if a procedure is declared for a clownFish class, which classes. Section 2 (Answer all questions in this section) 1In Alice, procedural abstraction is the concept of making code easier to. An asterisk (*) indicates a correct answer. Ok as i was updating i now find that the tank is adapting to the same error.Test: Java Fundamentals Midterm Exam Review your answers, feedback, and question scores below. i made sure to copy everything to the capitalization. In the last line it says it cant find the method setTimer for the same reason as "fire" but it is doubly odd because i referenced this in the joy of code trial "trick the turtle". Required: int found: no arguments reason: actual and formal arguments differ in length"Īnd the line "fire() " simply says "cannot find symbol - method fire()" (the method fire is in the bullet) }the line "Bullet bullet = new bullet() " gives the error "constructor Bullet in class Bullet cannot be applied to the given types MyWorld.addObject(new Bullet(getRotation()), getX(), getY()) Once you get going, you can check out the others. It is the second one listed in the second section on the left, called 'Trails Covering the Basics'. I would also suggest that you take a look at the Java tutorials. If you have any questions concerning the above, please do not hesitate to post a reply. Getting back to you bullets, they are not directed by user keystroke as they blindly follow the trajectory they are put into so most of the code in that class, as you have it, can be discarded and replaced with appropriate code for the bullet. The only thing you should have in its class code is a constructor, if even that (if you set a class image, then there is not anything to construct). The bullets should remove themselves upon reaching the edge of the world, or an obstacle it cannot pass through.Īs far as your bricks, they do nothing but exist wherever they are at. The tank can create multiple bullets (usually triggered by a specific user keypress). Another misunderstanding you may have is that you say you need the bullet to come back so you can fire it again. It is the tank that 'fires' the bullet (a bullet cannot fire itself). The only thing a bullet should do is 'quickly move until it either hits something or reaches the edge of the world. Each type of object has its own characteristics (which you implement). Evidently, you are missing out on some basic concepts of Object Oriented Programming.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |