Greenfoot an Introduction To

Total Page:16

File Type:pdf, Size:1020Kb

Greenfoot an Introduction To Greenfoot AnIntroductiontoOOP Presentedby AdrienneDecker StephanieHoeppner FranTrees SomematerialsbasedonGreenroomResources.Freetouse,modifyand distributeunderCreativeCommonsAttributionͲShareAlike3.0License. 1 Greenfoot acombinationbetweenaframeworkfor creatingtwoͲdimensionalgridassignmentsin JavaandanIDE. atoolforteachingprogrammingwiththeJava language. Intendedforages14andolder. Downloadfrom:http://www.greenfoot.org/ Ithasinterfacetranslationsintolanguages includingFrench,GermanandItalian. 2 SessionDescription Inthispresentation,wewillintroduce GfGreenfoot. Thispresentationisaimedatteachersof introductoryJavaprogrammingcourses(high schoolsanduniversities)whohavenever workedwiththeGreenfoot environment before. 3 PresentationDescription Thispresentationisintendedtogiveeducators anintroductiontotheGreenfoot environment,a demonstrationofhowitcanbeusedtointroduce objectͲorientedppgrogramming tostudents,anda guidedapproachtodevelopingGreenfoot experiencesthatcanbeintegratedintoexisting currilicula. Thesessionispractillicallyoridientedandallows participantstouseGreenfoot intheirclassroom immediately. 4 SessionGoals TointroducetheGreenfoot environment Asourcecodeeditor Aclassbrowser Compilationcontrol Executioncontrol Whilediscussingtheteachingof Javathroughexamples 5 Agenda BuildingaGreenfoot program(tolearnabout Greenfoot)CRABS,WORMS,andLOBSTERS Startwithanexistingscenario Introduceobjectsandclasses Workwithinteractingclasses Lookatmovementintheworld IldIncluderandombhbehav iorandsound 6 Agenda Movingbeyondthefirstscenario: Demonstrationofsomeadvancedfeaturesof Greenfoot: Imagecontrol Animation CollisionDetection 7 Agenda SomeexamplesusingGftGreenfoot tothteachor reviewCStopics Greenfoot.org PublishingScenarios AvailableResources Questions????? 8 Greenfoot (LittleCrabScenario) LikeBlueJ,Greenfoot teachesobjectͲoriented programminginavisualmanner.Eachactoris anobjectthatmovesaroundinaworld(also anobject). ThisallowsteachingofobjectͲoriented priilinciples(hd(methodiiinvocation,objectstate) beforeevenbeginningtolookatorwrite code. 9 Greenfoot Environment ClassDiagram World 10 Greenfoot classes (HelpOption) Actor GreenfootSound Greenfoot MouseInfo GreenfootImage World ObjectsandClasses Class Crab Instance ofthe constructor Crabclass 12 Definingstate(attributes) Object Inspector 13 Definingbehavior(methods) Crab methods 14 Definingbehavior(methods) Methods inheritedfrom Animal 15 Definingbehavior(methods) Methods inheritedfrom Actor 16 Actors 'Actors'havepredefinedstate: image location(intheworld) rotation CreateanewCrabandpress">Act" Click"ŹRun"tocallactcontinuously Nothing h!happens! 18 LetsinvestigatetheJavacodeforact! import greenfoot.; // (World, Actor, GftIGreenfootImage, and GftGreenfoot) / This class defines a crab. Crabs live on the beach. / public cl ass C rab ext end s A n ima l { public void act() Thecrabdoes { nothingwhenit } } acts! 19 DefiningtheCrab sbehaviorforact public class Crab extends Animal { public void act() { move(); } } Compile ŹRun Whathappens? 20 MovementͲKeyPoint Youcanchoosethelllevelofabtbstrac tion /comp lex ity toexposetoyourstudentsbypreparingthe scenario. move(); setLocation( getX()+1, getY() ); DefiningtheCrab sbehaviorfor act Ifcrabisattheedge,turnaroundand gotheotherway. public class Crab extends Animal { public void act() { move(); // more code here } } 22 Ifcrabisattheedge,turnaroundand gotheotherway. 23 Ifcrabisattheedge,turnsmoothlyand gotheotherway! public void act() { move(); if( atWorldEdge() ) { turn(15); } } 24 ObjectsandClasses Populateyourworldwithcrabs Eachinstanceofa CbCrab hasitsown attributes(state). 25 ObjectsandClasses Thedescriptionofwhatcomprisesanobject ofaparticular typeisaclass Aclass definesthebehavior andattributes(characteristics) ofobjects(whatanobjectknowsaboutitself). Objects areinstances ofaclass. objects Crab Crab class:blueprint forcrabs 26 Whatacrabknowsaboutitself: Crabscannot directlyaccess: x y Rotation World image Needaccessors andmutators providedby Actor todothat. 27 Crab inheritsfromActor Crabscannot directlyaccess: x y Rotation World image Needaccessors and mutators provided byActortodothat. 28 Crab inheritsfromActor Crabscannot directlyaccess: x y Rotation World image Needaccessors and mutators provided byActor todothat. 29 Crab inheritsfromActor Crabscannot directlyaccess: x y Rotation World image Needaccessors and mutators provided byActor todothat. 30 Crab inheritsfromActor Crabscannot directlyaccess: x y Rotation World image Needaccessors and mutators provided byActor todothat. 31 ObjectsandClasses Populateyourworldwithafewinstancesofthe Crab class. Cantherebemorethanoneobjectinaposition? CanaCrab movetoapositionthatanother Crab occupies? CanaCrab moveoutsidetheboundariesofthe world? Howisinvokingtheact methodofaCrab differentfromclickingtheact executioncontrol button. 32 Populatingtheworld (Usi ngtheGftGreenfoot API) http://www.greenfoot.org/doc/javadoc/ public CrabWorld() { super(560, 560, 1); addObject(new Crab(), 100, 200); addObject(new Crab(), 150,290); addObject(new Crab(), 300,400); addObject(new Crab(), 500,50); } 33 SavetheWorld! 34 Interactingclasses Thecrabsarehungry! CCabsrabseatwoos.rms. 1. RightclickAnimal;choose"New Subclass..." 2. Nameit"Worm". 3. Chooseanimage. Addwormstoyourworld. ŹRun Whathappens? 35 ModifytheCrabclasstoteachthecrab toeatworms. Ifthecrabseesaworm Worm.class Eattheworm 36 ModifytheCrabclasstoteachthecrab toeatworms Ifthecrabseesaworm Eattheworm public void act() { move(); if(canSee(Worm.class)) { eat(Worm.class); } else if( atWorldEdge() ) { turn(15); } } 37 Greenfoot sounds if(canSee(Worm.class)) { eat(Worm.class); GftlSdGreenfoot.playSound("s lurp.wav "); } Youcanchoosethelllevelof abstraction/complexitytoexposetoyour studentsbypreparingthescenario. Animal definescanSeeandeat... ...butitdoesnothaveto. 38 Summary:sofar .. Thedifferencebetweenobjectsandclasses Methodsignatureanddefinition Parameters Booleanexpressions int,boolean,andvoid returns private vs public if;if-else 39 Moreinterestingbehavior RandomNumbers InGreenfoot: int r = Greenfoot.getRandomNumber(();100); Returnsarandomint between0(inclusive)and100(exclusive) int r = Greenfoot. getRandomNumber(100)- 50; Returnsarandomint betweenͲ50(inclusive)and50(exclusive) 40 AmoreinterestingCrab public class Crab extends Animal { public void act() { if ( atWorldEdge( ) ) { turn(15 ); } move(); if (canSee(Worm.class)) { eat(Worm.class); } // Generate a random int between 0 and 100 // If the number is less than 10, turn a random number of degrees // between 0 and 45 (right or left). } } 41 TheimprovedCrab public class Crab extends Animal { public void act() { turnAtEdge() randomTurn(); move(); lookForWorm(); } } 42 AnalternateCrabWorld public CrabWorld() { super(560, 560, 1); populateWithCrabs(); populateWithWorms(); } public void populateWithCrabs() { final int NUM_CRABS = //add NUM_CRABS crabs in random locations } public void populateWithWorms() { final int NUM_WORMS = //add NUM_WORMS worms in random locations } 43 Gameisoverwhenthereareno worms! Whoseresponsibilityisittokeeptrackofthe worms? WorldMethods? Howdowe"stop"theGREENFOOTGame? 44 Boring NothingEXCITINGhappens! Introduce TheLobster 45 Interactiveprograms TheLbLobstermeetsthecrab Crabseatworms. Lobsterseatcrabs! Yougettocontrolthesinglecrab! 46 TheLobster TheLobster beha v esliketteheccabrabdddidbuteats crabsinsteadofworms. public void act() { turnAtEdge(); randomTurn(); move(); lookForCrab(); } Thecrab's behaviorwillchange. 47 TheinteractiveCrab Thecrabiscontrolledbythekeyboard. LeftarrowturnthecrabͲ4degrees Rightarrowturnsthecrab4 degrees public void act() { checkKeypress(); move(); lookForWorm(); } 48 Keypress public void checkKeypress() { if (Greenfoot.isKeyDown("left")) { turn(-4); } if (Greenfoot.isKeyDown("right")) { turn(4); } } 49 Animatedcreatures Animatethecrab! Theimagefilesusedforyouranimation shouldliveintheimagesfolderforthe project. crab.png crab2. png 50 Animatethecrab! private GreenfootImage image1; private GreenfootImage image2; public Crab() { image1 = new GreenfootImage("crab.png"); image2 = new GreenfootImage("crab2.png"); setImage(image1); } 51 Animatethecrab! public void act() { checkKeypress(); move(); lookForWorm(); switchImage(); } 52 OurnewWorld 53 Gameisoverwhenthereareno wormsORwhenalobstereatsthe crab DistinguishbetweenWINandLOSS 54 (Some)AdvancedFeatures CollisionDetection&Animations 55 KeyPoint(Reiterated) Youcancontrolthelevelofabstractionforthe studentswithregardstomovementand animation. 56 MovingActors public void move(double distance) { double angle = Math.toRadians( getRotation() ); int xx(=(int)Math.round(getX()+Math.cos(angle) distance); int y=(int)Math.round(getY()+Math.sin(angle) distance); setLocation(x, y); } 57 MotionUsingVectors SmoothMover classusesaVector tohold directionandspeedofmotion. CancreatesubclassesofSmoothMover to usethisstyleofmotion. Canillustratetheseparationofmodldeland view. 58 CollisionDetection Evenifyoudon thavethestudentscontrol motion/turning/etc.youcanstillhavethem writemoresophisticatedcollisiondetection behaviorsusingthebuiltinmethodsin Actor. 59 CollisionDetectionMethods java.util.List getIntersectingObjects(java.lang.Class cls) java.util.List getNeighbours(int distance,boolean diagonal,java.lang.Class cls) java.util.List getObjectsAtOffset(int dx,int dy,java.lang.Class cls) jilijava.util.List getObjectsInRange(int radius,jlCljava.lang.Class cls) ActorgetOneIntersectingObject(java.lang.Class cls) ActorgetOneObjectAtOffset(int
Recommended publications
  • The First Program: Little Crab
    CHAPTER 2 The first program: Little Crab topics: writing code: movement, turning, reacting to the screen edges concepts: source code, method call, parameter, sequence, if-statement In the previous chapter, we discussed how to use existing Greenfoot scenarios: We ­created objects, invoked methods, and played a game. Now we want to start to make our own game. 2.1 The Little Crab scenario The scenario we use for this chapter is called little-crab. You will find this scenario in the book-scenarios folder. The scenario you see should look similar to Figure 2.1. Exercise 2.1 Start Greenfoot and open the little-crab scenario. Place a crab into the world and run the program (click the Run button). What do you observe? (Remember: If the class icons on the right appear striped, you have to compile the project first.) On the right you see the classes in this scenario (Figure 2.2). We notice that there are the usual Greenfoot Actor and World classes, and subclasses called CrabWorld and Crab. The hierarchy (denoted by the arrows) indicates an is-a relationship (also called inher- itance): A crab is an actor, and the CrabWorld is a world. Initially, we will work only with the Crab class. We will talk a little more about the CrabWorld and Actor classes later on. If you have just done the exercise above, then you know the answer to the question “What do you observe?” It is: “nothing.” M02_KOLL4292_02_SE_C02.indd 17 2/3/15 7:39 PM 18 | Chapter 2 ■ The first program: Little Crab Figure 2.1 The Little Crab scenario Figure 2.2 The Little Crab classes The crab does not do anything when Greenfoot runs.
    [Show full text]
  • Metadefender Core V4.12.2
    MetaDefender Core v4.12.2 © 2018 OPSWAT, Inc. All rights reserved. OPSWAT®, MetadefenderTM and the OPSWAT logo are trademarks of OPSWAT, Inc. All other trademarks, trade names, service marks, service names, and images mentioned and/or used herein belong to their respective owners. Table of Contents About This Guide 13 Key Features of Metadefender Core 14 1. Quick Start with Metadefender Core 15 1.1. Installation 15 Operating system invariant initial steps 15 Basic setup 16 1.1.1. Configuration wizard 16 1.2. License Activation 21 1.3. Scan Files with Metadefender Core 21 2. Installing or Upgrading Metadefender Core 22 2.1. Recommended System Requirements 22 System Requirements For Server 22 Browser Requirements for the Metadefender Core Management Console 24 2.2. Installing Metadefender 25 Installation 25 Installation notes 25 2.2.1. Installing Metadefender Core using command line 26 2.2.2. Installing Metadefender Core using the Install Wizard 27 2.3. Upgrading MetaDefender Core 27 Upgrading from MetaDefender Core 3.x 27 Upgrading from MetaDefender Core 4.x 28 2.4. Metadefender Core Licensing 28 2.4.1. Activating Metadefender Licenses 28 2.4.2. Checking Your Metadefender Core License 35 2.5. Performance and Load Estimation 36 What to know before reading the results: Some factors that affect performance 36 How test results are calculated 37 Test Reports 37 Performance Report - Multi-Scanning On Linux 37 Performance Report - Multi-Scanning On Windows 41 2.6. Special installation options 46 Use RAMDISK for the tempdirectory 46 3. Configuring Metadefender Core 50 3.1. Management Console 50 3.2.
    [Show full text]
  • Metadefender Core V4.13.1
    MetaDefender Core v4.13.1 © 2018 OPSWAT, Inc. All rights reserved. OPSWAT®, MetadefenderTM and the OPSWAT logo are trademarks of OPSWAT, Inc. All other trademarks, trade names, service marks, service names, and images mentioned and/or used herein belong to their respective owners. Table of Contents About This Guide 13 Key Features of Metadefender Core 14 1. Quick Start with Metadefender Core 15 1.1. Installation 15 Operating system invariant initial steps 15 Basic setup 16 1.1.1. Configuration wizard 16 1.2. License Activation 21 1.3. Scan Files with Metadefender Core 21 2. Installing or Upgrading Metadefender Core 22 2.1. Recommended System Requirements 22 System Requirements For Server 22 Browser Requirements for the Metadefender Core Management Console 24 2.2. Installing Metadefender 25 Installation 25 Installation notes 25 2.2.1. Installing Metadefender Core using command line 26 2.2.2. Installing Metadefender Core using the Install Wizard 27 2.3. Upgrading MetaDefender Core 27 Upgrading from MetaDefender Core 3.x 27 Upgrading from MetaDefender Core 4.x 28 2.4. Metadefender Core Licensing 28 2.4.1. Activating Metadefender Licenses 28 2.4.2. Checking Your Metadefender Core License 35 2.5. Performance and Load Estimation 36 What to know before reading the results: Some factors that affect performance 36 How test results are calculated 37 Test Reports 37 Performance Report - Multi-Scanning On Linux 37 Performance Report - Multi-Scanning On Windows 41 2.6. Special installation options 46 Use RAMDISK for the tempdirectory 46 3. Configuring Metadefender Core 50 3.1. Management Console 50 3.2.
    [Show full text]
  • Blue, Bluej and Greenfoot
    Kent Academic Repository Full text document (pdf) Citation for published version Kölling, Michael (2016) Lessons from the Design of Three Educational Programming Environments: Blue, BlueJ and Greenfoot. International Journal of People-Oriented Programming, 4 (1). pp. 5-32. ISSN 2156-1796. DOI https://doi.org/10.4018/IJPOP.2015010102 Link to record in KAR http://kar.kent.ac.uk/56662/ Document Version Publisher pdf Copyright & reuse Content in the Kent Academic Repository is made available for research purposes. Unless otherwise stated all content is protected by copyright and in the absence of an open licence (eg Creative Commons), permissions for further reuse of content should be sought from the publisher, author or other copyright holder. Versions of research The version in the Kent Academic Repository may differ from the final published version. Users are advised to check http://kar.kent.ac.uk for the status of the paper. Users should always cite the published version of record. Enquiries For any further enquiries regarding the licence status of this document, please contact: [email protected] If you believe this document infringes copyright then please contact the KAR admin team with the take-down information provided at http://kar.kent.ac.uk/contact.html International Journal of People-Oriented Programming January-June 2015, Vol. 4, No. 1 Table of Contents SIKONL C I T L V PF EP iv Steve Goschnick, Swinburne University of Technology, Melbourne, Australia Leon Sterling, Swinburne University of Technology, Melbourne, Australia
    [Show full text]
  • Java Ide's One-On-One*
    DR. J VS. THE BIRD: JAVA IDE'S ONE-ON-ONE* Michael Olan Computer Science and Information Systems Richard Stockton College Pomona, NJ 08240 609-652-4587 [email protected] ABSTRACT An important decision facing instructors of introductory programming courses is the choice of supporting software development tools. Usually this involves selecting an integrated development environment (IDE). BlueJ has received widespread adoption for first year courses that use the Java programming language; however, DrJava is emerging as an alternative. This paper features a comparison of the pedagogical approaches used by BlueJ and DrJava as a guideline for selecting the tool best suited to the teaching style used in the introductory course. 1. INTRODUCTION The choice was simple when text editors and the command line were the only tools for developing programs. That changed with the introduction of integrated development environments (IDE's), and campuses nationwide adopted Borland's Turbo Pascal. Languages also have changed. Pascal was designed as a teaching language, but now academic programs use advanced languages designed for professional software engineers. Making these complex languages accessible to beginning students requires a careful selection of the development environment. This discussion will only include Java, currently the dominant language choice for introductory courses. Let us first consider several levels of tool support in the introductory course sequence: 1) Minimal: A text editor and the command line. 2) Simple IDE: Just the basics, no bells and whistles. 3) Professional IDE: Powerful and feature filled. ___________________________________________ * Copyright © 2004 by the Consortium for Computing Sciences in Colleges. Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the CCSC copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Consortium for Computing Sciences in Colleges.
    [Show full text]
  • Exploring Student Perceptions About the Use of Visual Programming
    Exploring student perceptions about the use of visual programming environments, their relation to student learning styles and their impact on student motivation in undergraduate introductory programming modules Maira Kotsovoulou (BSc, MSc) July 2019 This thesis is submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy. Department of Educational Research, Lancaster University, UK. Exploring student perceptions about the use of visual programming environments, their relation to student learning styles and their impact on student motivation in undergraduate introductory programming modules Maira Kotsovoulou (BSc, MSc) This thesis results entirely from my own work and has not been offered previously for any other degree or diploma. The word count is 57,743 excluding references. Signature ........................................................ Maira Kotsovoulou (BSc, MSc) Exploring student perceptions about the use of visual programming environments, their relation to student learning styles and their impact on student motivation in undergraduate introductory programming modules Doctor of Philosophy, July 2019 Abstract My research aims to explore how students perceive the usability and enjoyment of visual/block-based programming environments (VPEs), to what extent their learning styles relate to these perceptions and finally to what extent these tools facilitate student understanding of basic programming constructs and impact their motivation to learn programming. My overall methodological approach is a case study that explores the nature of potential benefits to using a VPE in an introductory programming module, within the specific context of an English-speaking institution of higher learning in Southern Europe. Part 1 of this research is a pilot study, which uses participatory action research as a methodological practice to identify which visual programming environment will be selected for the main study.
    [Show full text]
  • Objects First with Java™ a Practical Introduction Using Bluej
    Objects First with Java™ A Practical Introduction Using BlueJ David J. Barnes and Michael Kölling University of Kent Sixth Edition Boston Columbus Indianapolis New York San Francisco Hoboken Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo A01_BARN7367_06_SE_FM.indd 1 10/03/16 4:08 pm Contents Foreword xiv Preface xv List of Projects Discussed in Detail in This Book xxv Acknowledgments xxviii Part 1 Foundations of Object Orientation 1 Chapter 1 Objects and Classes 3 1.1 Objects and classes 3 1.2 Creating objects 4 1.3 Calling methods 5 1.4 Parameters 6 1.5 Data types 7 1.6 Multiple instances 8 1.7 State 9 1.8 What is in an object? 10 1.9 Java code 11 1.10 Object interaction 12 1.11 Source code 13 1.12 Another example 15 1.13 Return values 15 1.14 Objects as parameters 16 1.15 Summary 17 Chapter 2 Understanding Class Definitions 21 2.1 Ticket machines 21 2.2 Examining a class definition 23 2.3 The class header 25 2.4 Fields, constructors, and methods 26 2.5 Parameters: receiving data 32 2.6 Assignment 34 A01_BARN7367_06_SE_FM.indd 5 10/03/16 4:08 pm vi | Contents 2.7 Methods 35 2.8 Accessor and mutator methods 36 2.9 Printing from methods 39 2.10 Method summary 42 2.11 Summary of the naïve ticket machine 42 2.12 Reflecting on the design of the ticket machine 43 2.13 Making choices: the conditional statement 45 2.14 A further conditional-statement example 47 2.15 Scope highlighting 48 2.16 Local variables 50 2.17 Fields, parameters, and
    [Show full text]
  • Experiences Using Bluej's Submitter with an Automated Grader
    We use BlueJ in our CS1 course Experiences Using BlueJ’s Submitter with an Automated Grader Aggressively objects-first, taught in Java We teach software testing from the very first lab as well Stephen Edwards Virginia Tech We use an automated grading system called Web-CAT Dept. of Computer Science [email protected] Web-CAT accepts submissions via HTTP http://people.cs.vt.edu/~edwards/ http://web-cat.sourceforge.net/ Stephen Edwards BlueJ Day: Experiences Using BlueJ’s Submitter Virginia Tech Web-CAT is a flexible, customizable grading Our strategy for managing submission system that supports test-based assignments definitions has evolved over time Submission.defs format allows BlueJ to include definitions We require students to write tests for everything from a URL, so they can be loaded from anywhere CS1CS1 Our grading system runs student tests on their code, and Sub. DynamicallyHTML Sub. DynamicallyHTML CS2 defs orGenerated! PHP CS2 Performs static analysis (checkstyle, PMD) defs orGenerated! PHP CS3CS3 Tracks code coverage (Clover) First, we used a single web-hosted definitions file Then we let each instructor write their own, and used a Supports “by hand” feedback too top-level file to include them all together Then we modified Web-CAT to dynamically generate Provides feedback in one, integrated HTML report submission.defs for the assignments it knows about Stephen Edwards BlueJ Day: Experiences Using BlueJ’s Submitter Virginia Tech Stephen Edwards BlueJ Day: Experiences Using BlueJ’s Submitter Virginia Tech Student
    [Show full text]
  • DUM Č. 1 V Sadě 35. Inf-11 Objektové Programování V Greenfoot
    projekt GML Brno Docens DUM č. 1 v sadě 35. Inf-11 Objektové programování v Greenfoot Autor: Lukáš Rýdlo Datum: 08.06.2014 Ročník: studenti semináře Anotace DUMu: Úvodní informace k celé sadě, metodika. Simulace života zajíce v Greenfoot - seznámení s prostředím aplikace a jazykem. Materiály jsou určeny pro bezplatné používání pro potřeby výuky a vzdělávání na všech typech škol a školských zařízení. Jakékoliv další využití podléhá autorskému zákonu. Sada projektů pro výuku programování mírně pokročilých studentů Úvod k sadě DUMů Tato sada DUMů obsahuje tři části a v ní dva projekty vhodné pro mírně pokročilé studenty programování. Části popořadě obsahují projekt simulační hry „Život zajíce“ v jazyce Java a prostře- dí Greenfoot, druhá část obsahuje tutéž simulační hru v jazyce C s využitím grafické (herní) knihov- ny Allegro (a IDE Dev-C) a třetí část je věnována projektu bitmapového konvertoru v jazyce C pro příkazovou řádku. Tyto tři značně nesourodé projekty mají dát možnost šikovnějším studentům programování srovnat různé přístupy a paradigmata i prostředí. Na rozdíl od ustrnulé individuální a systematické výuky jednoho konkrétního jazyka je mají připravit na reálné programátorské úkoly v reálném prostředí, ve kterém programátor musí často volit různé přístupy nebo paradigmata a učit se vhodnější a pro daný úkol lépe použitelnější jazyk, dohledávat si potřebné informace ve zdrojích na internetu a ne- spoléhat jen na naučenou teorii. V DUMech nebude vysvětlena teorie systematicky, ale zásadně pouze s orientací na řešení konkrét- ního problému a také formou odkazů na externí zdroje. Předpokládám, že studenti již ovládají zá- kladní syntax nějakého C-like jazyka a dovedou minimálně pracovat s proměnnými, podmínkami a (vnořenými) cykly, že dovedou sami a bez pomoci řešit jednoduché úkoly, umí program zkompi- lovat a spustit v nějakém IDE.
    [Show full text]
  • Greenfoot: Combining Object Visualisation with Interaction
    greenfoot: Combining Object Visualisation with Interaction Poul Henriksen Michael Kölling Mærsk McKinney Møller Institute Mærsk McKinney Møller Institute University of Southern Denmark University of Southern Denmark [email protected] [email protected] ABSTRACT infrastructure. These tools range from custom class libraries The introduction of programming education with object- for specific tasks over thematic frameworks to full oriented languages slowly migrates down the curriculum and programming environments. is now often introduced at the high school level. This While a number of useful tools have been produced, there is migration requires teaching tools that are adequate for the considerable room for improvement. Specifically, the intended target audience. introduction of object orientation below the university level, In this paper, we present a new tool for teaching object- e.g. in high schools, is a very recent development that might oriented programming aimed at students at or below college benefit from more targeted tool support. level, with special emphasis of supporting school age learners. The ‘objects-early’ movement has argued for a long time that it This tool was designed by analysing and combining the most is important to teach good object-oriented practices from the beneficial aspects of several existing tools. It aims at start, to avoid having to correct or unlearn bad practices later. combining the simplicity and visual appeal of Karel the Robot While this has led to a wide acceptance of teaching about with much of the flexibility and interaction of BlueJ, while at objects early in first semester college courses, the target has the same time opening up possibilities of new applications.
    [Show full text]
  • Bluej Manual
    BlueJ COMPANION MANUAL To accompany Big Java 2e and Java Concepts 4e by Cay Horstmann BRUCE QUIG, Deakin University Based on the BlueJ Tutorial by Michael Kölling John Wiley & Sons, Inc. SENIOR ACQUISITIONS EDITOR Bill Zobrist EDITORIAL ASSISTANT Bridget Morrisey PRODUCTION EDITOR Marsheela Evans MARKETING DEVELOPMENT MANAGER Phyllis Cerys . Book printed and bound by________________. The cover was printed by__________________. This book is printed on acid free paper. ∞ Copyright 2005 John Wiley & Sons, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc. 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978)646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008. To order books or for customer service please, call 1-800-CALL WILEY (225-5945). ISBN 0-471-73712-7 Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 Contents 1 About BlueJ 1 About this manual 2 Scope and audience 2 Feedback 2 2 Installation 3 Installation on Windows 3 Installation on Macintosh 4 Installation on Linux/Unix and other Systems 4 Installation problems 4 3 Getting started – using classes 5 Starting BlueJ 5 Creating the project directory 5 Exploring System classes 5 Creating Library objects 7 Execution 8 4 Writing your own classes 11 Opening an existing project 11 Editing a class 12 Compilation 13 Help with compiler errors 14 Creating objects 14 Adding a Driver class 16 5 Doing a bit more..
    [Show full text]
  • The Bluej Environment Reference Manual
    The BlueJ Environment Reference Manual Version 2.0 for BlueJ Version 2.0 Kasper Fisker Michael Kölling Mærsk Mc-Kinney Moller Institute University of Southern Denmark HOW DO I ... ? – INTRODUCTION ........................................................................................................ 1 ABOUT THIS DOCUMENT................................................................................................................................. 1 RELATED DOCUMENTS.................................................................................................................................... 1 REPORT AN ERROR.......................................................................................................................................... 1 USING THE CONTEXT MENU........................................................................................................................... 1 1 PROJECTS.......................................................................................................................................... 2 1.1 CREATE A NEW PROJECT................................................................................................................... 2 1.2 OPEN A PROJECT ............................................................................................................................... 2 1.3 FIND OUT WHAT A PROJECT DOES .................................................................................................... 2 1.4 COPY A PROJECT ..............................................................................................................................
    [Show full text]