+ All Categories
Home > Documents > 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is...

7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is...

Date post: 26-Mar-2015
Category:
Upload: kyle-clay
View: 218 times
Download: 1 times
Share this document with a friend
Popular Tags:
37
Jun 7, 20 22 Using Jeroo Dianne Meskauskas
Transcript
Page 1: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Apr 10, 2023

Using JerooDianne Meskauskas

Page 2: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Overview

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

Page 3: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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.

Page 4: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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

Page 5: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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

Page 6: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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

Page 7: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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

Page 8: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Essential Concepts - OOP

Message – a request for a specific object to perform a specific taskWhen 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.

Page 9: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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.

Page 10: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Where did Jeroo come from?

NW Missouri State University Used in introductory college programming classes. Under development It’s free. www.jeroo.org

Page 11: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Why use Jeroo?

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

Page 12: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Jeroo

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.

Page 13: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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?

Page 14: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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.

Page 15: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

How Jeroo works

3 steps:1. Create your environment

2. Write the program

3. Run the program

Page 16: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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

Page 17: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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.

Page 18: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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)

Page 19: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

A video demonstrating the Jeroo environment

(click the link below)

Start the video

To create your environment in Jeroo:

Left-click to draw

Right-click to remove

Page 20: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Your first island: Assignment

1. Design an island that uses water, nets and flowers to create an attractive design based on one or more of your initials.

2. 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.

3. Print your island design. Now try to make the rest of your initials yournameLetterIsland2 and 3

Page 21: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

The End

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

Page 22: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Apr 10, 2023

Jeroo Code

Page 23: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Overview

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

Page 24: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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.

Page 25: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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

Page 26: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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.

Page 27: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Coding practice

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.

Answers:

•Jeroo neo = new Jeroo();

•neo.hop( );

•neo.turn(RIGHT);

Page 28: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Choosing directions

Four relative directions LEFT RIGHT AHEAD HERE

Four compass directions NORTH SOUTH EAST WEST

When you turn, you must specify a relative direction

Page 29: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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(); alexandria.hop(); alexandria.hop();

Write the code to make neo hop forward 5 times .• neo.hop(5);

Page 30: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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

Page 31: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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

Page 32: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

Step 3: Run the program

3 different language modes

You want Java/C++/C#

Page 33: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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

Page 34: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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!

Page 35: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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.

Page 36: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

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)

Page 37: 7-Jan-14 Using Jeroo Dianne Meskauskas. Overview In this presentation we will discuss: What is Jeroo? Where did it come from? Why use it? How it works.

The End


Recommended