20
Using Jeroo To Teach Object- Oriented Concepts By Christian Digout

Using Jeroo To Teach Object-Oriented Concepts

  • Upload
    avani

  • View
    63

  • Download
    0

Embed Size (px)

DESCRIPTION

Using Jeroo To Teach Object-Oriented Concepts. By Christian Digout. What is Jeroo ?. A tool for helping students learn object-oriented concepts including : Instantiating and using objects Constructors Writing methods to extend behavior Information Hiding. Jeroo Layout. - PowerPoint PPT Presentation

Citation preview

Page 1: Using  Jeroo To Teach Object-Oriented Concepts

Using JerooTo Teach Object-Oriented

ConceptsBy

Christian Digout

Page 2: Using  Jeroo To Teach Object-Oriented Concepts

What is Jeroo?A tool for helping students learn

object-oriented concepts including:◦Instantiating and using objects◦Constructors ◦Writing methods to extend behavior◦Information Hiding

Page 3: Using  Jeroo To Teach Object-Oriented Concepts

Jeroo Layout

Page 4: Using  Jeroo To Teach Object-Oriented Concepts

Example of a Program

Page 5: Using  Jeroo To Teach Object-Oriented Concepts

Features of the Jeroo ApplicationAnimation showing Jeroos moving

around the island Source code highlighting synchronized

with execution Stepwise or continuous execution

mode Choice of execution speeds Ability to switch between execution

modes and change speeds at will Error messages

Page 6: Using  Jeroo To Teach Object-Oriented Concepts

Summary of JerooSmall Object-Oriented LanguageOnly one class, the Jeroo class Can instantiate up to four Jeroos Three attributes per Jeroo

◦location ◦direction ◦number of flowers

Page 7: Using  Jeroo To Teach Object-Oriented Concepts

Summary of JerooSix constructors to initialize the

attributes Seven action methods Seven sensor methods to

examine the immediate surroundings

Four relative directions

Page 8: Using  Jeroo To Teach Object-Oriented Concepts

InstantiationThe process of creating an

instance of an object.Jeroo has 6 constructors

◦Including a default constructorThe new operator is used to

instantiate objects

Page 9: Using  Jeroo To Teach Object-Oriented Concepts

Constructors

Page 10: Using  Jeroo To Teach Object-Oriented Concepts

Objects and JerooStates (or member variables)Position (x, y)Direction (North, East, South, West)Number of flowers

Information Hiding◦A Jeroo’s data is protected◦Protects data integrity◦Need to use member methods to access

member variables

Page 11: Using  Jeroo To Teach Object-Oriented Concepts

Behavior and Member Methods

Page 12: Using  Jeroo To Teach Object-Oriented Concepts

Behaviors and Member Members

Page 13: Using  Jeroo To Teach Object-Oriented Concepts

Student AssignmentsFrom the Jeroo website:

◦Pick All Flowers◦The Maze◦Walk the Lake◦http://home.cc.gatech.edu/dorn/48

Page 14: Using  Jeroo To Teach Object-Oriented Concepts

JerooUse of constructorsGet use to the dot-notationUse member methodsCan extend the Jeroo class with

new methods

Page 15: Using  Jeroo To Teach Object-Oriented Concepts

Java – Building a Classpublic class Circle {private static final double PI = 3.14;private double radius;

public Circle() {radius = 1;}

public void setRadius(double newRadius) {radius = newRadius;} }

Page 16: Using  Jeroo To Teach Object-Oriented Concepts

Jeroo ClassIt is written in JavaAsk students what would it

include?◦6 constructors◦Member variables◦Member methods

Page 18: Using  Jeroo To Teach Object-Oriented Concepts

Turtle GraphicsGood for showing:

◦Composition “has a” relationships◦Inheritance “is a” relationships◦Interfaces◦Abstract classes

Page 19: Using  Jeroo To Teach Object-Oriented Concepts

Turtle GraphicsCreate a Shape InterfaceAbstractShape can implement

Shape◦Can implement members that would

be the same for all shapes such as: X and Y coordinates Move function

◦Abstract methods would be: Area Draw

Page 20: Using  Jeroo To Teach Object-Oriented Concepts

Shape HierarchyCan implement Circle and

Rectangle Classes with students.◦Extend Abstract Shape

Assignment:◦Students implement a Triangle Class◦Students can add a Perimeter

Method to the hierarchy