Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using Jeroo Dianne Meskauskas

Similar presentations


Presentation on theme: "Using Jeroo Dianne Meskauskas"— Presentation transcript:

1 Using Jeroo Dianne Meskauskas
25-Mar-17

2 Overview In this presentation we will discuss: What is Jeroo?
Where did it come from? Why use it? How it works. Your first assignments.

3 What is Jeroo? An environment for learning object oriented programming. (OOP) The Jeroo language is a small object-oriented programming language. you create objects and then do things with them. Created in Java.

4 Essential Concepts Program – a set of instructions for the computer
Source Code – a program written by a programmer in a programming language Compiler – translates a program (or class) as a whole into another form such as byte code or machine code Interpreter – translates a program into machine language one statement at a time Java Byte Code – intermediate language created by the Java compiler. The JVM translates byte code into machine code. Machine Code – program in the form of binary codes - a series of 1’s and 0’s - that are understandable by the computer’s CPU

5 Essential Concepts Algorithm – a plan for solving a problem
Syntax – a set of rules for writing or speaking a language Semantics – the meaning associated with valid expressions

6 Essential Concepts - OOP
Object – represents a specific concept or item that is relevant to a problem to be solved. There are two parts to an object, facts about the object and tasks it can perform. Attribute – is a fact associate with a specific object Behavior – is an action an object can perform in response to a request from an external source

7 Essential Concepts - OOP
Method – a collection of statements that are written in some programming language to describe a specific behavior Method Precondition – something that is assumed to be true before the method is invoked Method Postcondition – something that is assumed to be true after the method has been executed

8 Essential Concepts - OOP
Message – a request for a specific object to perform a specific task When we ask an object to perform a task (behavior), we are sending a message to the object or invoking the method that describes the task.

9 Essential Concepts - OOP
Class – is a collection of statements that are written in some programming language to describe both the attributes and the behaviors of an object. Instantiation – the process of creating a specific object. Jeroo clyde = new Jeroo(); clyde is an instance of the Jeroo class.

10 Where did Jeroo come from?
NW Missouri State University Used in introductory college programming classes. Under development It’s free.

11 Why use Jeroo? Jeroo keeps the focus on important topics.
Students master ideas faster. Jeroo stimulates problem solving. Jeroo encourages experimentation. It’s fun!

12 Jeroo Jeroos Humans arrive and set nets to catch Jeroos.
Place: Santong Island in the South Pacific Two unknown species Jeroo: similar to the wallabies of Australia Winsum Flower: Jeroo's source of food Jeroos have a pouch to hold flowers can't swim – fur gets waterlogged-must dry Humans arrive and set nets to catch Jeroos.

13 The Jeroo environment The island is made of rows and columns.
The programmer chose to number both the rows and columns starting with zero at the northwest corner of the island. (0,0) (0,1) (?) (3,2) NORTH What location is this?

14 Programming steps A Jeroo can execute 6 action methods
hop()  hop once or hop(n) to hop n times turn( relative_direction ) pick()  pick a flower plant()  plant a flower from the pouch toss()  throw a flower one space ahead. Give (relative direction)  give a flower to another jeroo They always follow directions in order, from top to bottom. Put it all together to solve various problems.

15 How Jeroo works 3 steps: Create your environment Write the program
Run the program

16 Icons used to create and edit islands
Set the speed of the Jeroos Create a new island layout Open an existing island Save the island Save as Print Plant flowers on the island Set nets on the island Add water to the island Clear the island layout (remove all extra flowers, water and nets) Get help with the Jeroo language Quit Jeroo

17 Step 1. Create the Environment
To start: Open an existing Island File Or Create your own Island Add or remove: Flowers Nets Water Land You can save and re-use your islands.

18 Learn how to create islands.
Select water, flower or net left-click to add right-click to remove Learn how to save islands. Programs and islands are saved separately Source_file save (.jsc) Island_file save (.jev)

19 A video demonstrating the Jeroo environment
To create your environment in Jeroo: Left-click to draw Right-click to remove (click the link below) Start the video

20 Your first island: Assignment
Design an island that uses water, nets and flowers to create an attractive design based on one or more of your initials. Click the floppy disk on the island side and save as yournameLetterIsland1 to your folder by clicking the down arrow for Save in and choosing the Thawspace (T:) and double clicking the lower case: wbhs-lab6105 (middle) and double clicking My Documents folder and double clicking your folder. Print your island design. Now try to make the rest of your initials yournameLetterIsland2 and 3

21 The End Staple the fill in the blank sheet on top of your print out.
With the rubric

22 Jeroo Code 25-Mar-17

23 Overview In this presentation we will discuss:
How to write code in Jeroo How to run a Jeroo program

24 Review: Step 1. Create the Environment
To start: Open an existing Island File Or Create your own Island Add or remove: Flowers Nets Water Land You can save and re-use your islands.

25 Step 2. Write the program You can create and control up to 4 Jeroos.
Your program must have a main method Each Jeroo gets a name when it is created Refer to them by name to send them a message

26 The constructor statement
Jeroo alfred = new Jeroo() A new Jeroo is created and assigned the name alfred. alfred will appear in the top left corner of the island, facing east. All statements in the main program must specify which Jeroo is to act, and what it is to do. alfred.toss() tells alfred to toss a flower into the space ahead.

27 Coding practice Answers: Jeroo neo = new Jeroo(); neo.hop( );
Write the code to create a new Jeroo named neo Write the code to make neo hop Write the code to make neo turn right. Jeroo neo = new Jeroo(); neo.hop( ); neo.turn(RIGHT);

28 Choosing directions Four relative directions Four compass directions
LEFT RIGHT AHEAD HERE Four compass directions NORTH SOUTH EAST WEST When you turn, you must specify a relative direction

29 hopping hop() alone means hop once in the direction the Jeroo is facing hop(n) will tell the Jeroo to hop n times Example: alexandria.hop(3); is the same as: alexandria.hop(); Write the code to make neo hop forward 5 times . neo.hop(5);

30 Step 3: Run the program Animation shows Jeroos moving around the island Source code highlights while executing You can run one step at a time Run the whole program continuously Pause at any time Go back to the beginning, or stop

31 Watch a program running
the code is highlighted the Jeroo acts Click the link to see demonstration of A Jeroo program running continuously

32 Step 3: Run the program 3 different language modes
You want Java/C++/C#

33 Find the logic errors Go to Jeroo and create a flower at 3,2. (left click to create a flower, right-click to erase a flower) Type the commands exactly as you see them then run the program to find the errors Save it as Your Initials Alexandria to your folder

34 Your First Program Start Jeroo Enter your name
1. Create the environment Clear the island layout. Place a flower at location Row 12 Column 12 2. Write the program Create a Jeroo with your name Tell it to hop to the flower Tell it to pick the flower 3. Run the program If it doesn’t work, fix it!

35 The program goes in the main method
Create a Jeroo with your name Jeroo mrsH = new Jeroo( ); It will appear in location 0,0 facing EAST with no flowers in its pouch. Tell it to hop onto the location with the flower mrsH.hop( ); You must address your Jeroo by name. repeat this statement each time you want your Jeroo to hop mrsH.turn (relative direction); You must turn either LEFT or RIGHT Tell it to pick the flower: the Jeroo must be ontop of the flower to pick it mrsH.pick( ); It will stop when it reaches the end of the program.

36 Top Grade Write a program to get a Jeroo from one end of your original letter island to the other using AT LEAST 8 programming steps. Save the program as yourNameLetterIsland (the programming code will be saved with .jsc for jeroo source code as the extension. The island will be saved with .jev for jeroo environment as the extension so it is safe to name the island the program with the same name)

37 The End


Download ppt "Using Jeroo Dianne Meskauskas"

Similar presentations


Ads by Google