Intro to Computer Science

Submitted by: Submitted by

Views: 189

Words: 510

Pages: 3

Category: Science and Technology

Date Submitted: 06/06/2013 07:46 PM

Report This Essay

Name:__________________ Introduction to Computer Science

Date:____________ 1.1 to 1.4 Notes

Directions: Answer the following questions. Make sure you understand the topics being covered. You are going to need to open the scenario leaves-and-wombats. This can be found on the public drive, near the dropbox folder. Copy the entire folder onto your network drive.

1. Define the following:

a. World: the largest area of the screen; where everything happens

b. class diagram – the area of the right of the screen and shows us the classes involved in our scenario

c. execution controls – buttons on the bottom of the screen that allows us to run, reset, and act the program

2. Java is an object oriented language.

3. Once you have a class in Greenfoot, you can create objects or instances from it.

4. Another name for objects is instances

5. When you right click on the WOMBAT class, you will see the class menu pop up.

Exercise 1.1: Create some more wombats in the world. Create some leaves.

6. How can you interact with these objects? Right click

7. Define object menu. A menu that shows us all the operations a specific object can perform

8. Inspect, remove, move, turnLeft are what type of operations? Invoking the method

Exercise 1.2: Invoke the move() method on a wombat. What does it do? Try it several times. Invoke the turnLeft() method. Place two wombats into your world and make them face each other.

The move method makes the wombat move forward one space in a forward direction

9. When you look at the methods void move() and void turnLeft(), there is the world VOID at the beginning and a pair of parentheses at the end. What does this tell us?

They tell us what type of information is returned and what data is going into the method

10. What do you call the word at the beginning? What does it tell us?

It is called the return type and it tells us what the method returns when it is...