Documents

4 pages
396 views

Quiz 3-1 Java Fundamental

Please download to get full document.

View again

of 4
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Share
Description
Quiz 3-1 Java Fundamental
Transcript
  1.  An object is an instance of a class. True or false?   Mark for Review   (1) Points   True (*)   False   Correct   2. In Greenfoot to create a new instance of a class, you right-click on the class, then select which of the following commands in the class menu?   Mark for Review   (1) Points   Inspect Duke()   New subclass...   new Duke() (*)   Set image...   Remove Duke()   Correct   3. Which of the following Java syntax is used to correctly create a Bee subclass?   Mark for Review   (1) Points   public class Bee extends World   private Bee extends World   public class Bee extends Animal (*)   private class extends Actor   private class extends Bee   Correct   4. From your Greenfoot lessons, a scenario is a game or simulation implemented in Greenfoot. True or false?   Mark for Review   (1) Points   True (*)   False   Correct   5. In Greenfoot, the turn method expects what type of information in its parameters?   Mark for Review   (1) Points   Integer of steps to move forward   Parameter void      Degrees to turn (*)   String statement   True or false response   Correct   6.  An instance variable can be saved and accessed later, even if the instance no longer exists. True or false?   Mark for Review   (1) Points   True   False (*)   Correct   7. In the Greenfoot IDE, an instance's position is on the x and y coordinates. True or false?   Mark for Review   (1) Points   True (*)   False   Correct   8. In Greenfoot, methods can be called in the act method. When the Act button is clicked in the environment, the methods in the method body of the act method are executed. True or false?   Mark for Review   (1) Points   True (*)   False   Correct   9. The list below provides actions you can perform in the Greenfoot code editor except one. Which one should be removed?   Mark for Review   (1) Points   Write and edit comments.   Write source code to tell the class how to act in the scenario.   Review the online Java Library documentation. (*)   Write and edit source code.   Correct      10. From your Greenfoot lessons, in an if-statement, the programming statements written in curly brackets are executed simultaneously. True or false?   Mark for Review   (1) Points   True   False (*)   Correct   11. From your Greenfoot lessons, how do you know the program does not contain syntax errors?   Mark for Review   (1) Points   Compile the code. (*)   Inspect the instances.   Review the documentation.   Write the code.   Correct   12. From your Greenfoot lessons, which type of constructor can be used to automate creation of Actor instances?   Mark for Review   (1) Points   World (*)    Animal    Actor    Vector   Correct   13. From your Greenfoot lessons, what can methods belong to?   Mark for Review   (1) Points   (Choose all correct answers)   Galleries   Classes (*)   Scenarios   Objects (*)    All of the above   Correct      14. From your Greenfoot lessons, which programming statement creates a new Bee object, and places it at x = 120, y = 100 in the world?   Mark for Review   (1) Points   Move(120,100);   addWorld (new Bee( ), 120, 100);   addClass (new Bee( ), 120, 100);   addObject (new Bee( ), 120, 100); (*)   Incorrect. Refer to Section 3 Lesson 5.   15. From your Greenfoot lessons, when does an if-else statement execute it's second code segment?   Mark for Review   (1) Points   When an instance is created.   If a condition is false. (*)   If a condition is true.    After the first code segment is executed.   When a random number is less than 10.   Correct  
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x