Test review. When? Monday 9/27 in class Know Greenfoot How many classes? Top-most classes? What does each button do? Lowest child class?

Slides:



Advertisements
Similar presentations
Creative Computing. \\ aims By the end of the session you will be able to: 1.Move objects around 2.Write simple interactive programs 3.Use the mouse position.
Advertisements

Introduction to Programming Java Lab 1: My First Program 11 January JavaLab1.ppt Ping Brennan
Game with US Beginner Tutorial. Welcome!! Who I am What is Processing? Basic Coding Input Methods Images Classes Arrays.
Lecture # 21 Chapter 6 Uptill 6.4. Type System A type system is a collection of rules for assigning type expressions to the various parts of the program.
Getting your Feet Green
Getting to know Greenfoot
Classes  All code in a Java program is part of a class  A class has two purposes  Provide functions to do work for the programmer  Represent data.
2/18/2008ITK 1681 Feb. 20, Wed. 8:00 – 9:30 pm STV Closed book, notes, and no computer is allowed. 2.Everyone is allowed to bring a self- prepared.
Games and Simulations O-O Programming in Java The Walker School
Animation Mrs. C. Furman. Animation  We can animate our crab by switching the image between two pictures.  crab.png and crab2.png.
of Kent A practical introduction to Greenfoot David Barnes Lecturer in Computer Science University of.
Chapter 2 - The First Program: Little Crab
Program: Little Crab Mr Gano.
Lecture 2 Introduction to C Programming
Asteroids Games and Simulations O-O Programming in Java The Walker School The Walker School – Games and Simulations
Wombats Creating Games with Greenfoot The Walker School – Games and Simulations
Chapter 1 - Getting to know Greenfoot Bruce Chittenden.
Movement. Fixed Movement setLocation (x, y) Makes the crab move to a fixed cell x,y Relative Movement The functions: getX() getY() Fetch the x and y coordinate.
Method exercises. Setup Create one new project to hold all of these. In that project, create an empty class called WorkIt to hold all of your methods.
ICM Week 2. Structure - statements and blocks of code Any single statement ends with semicolon ; When we want to bunch a few statements together we use.
Writing Conditionals and Practicing TDD. TDD Refresher RED – write the test and watch it fail – Why do we watch it fail? GREEN – write the simplest code.
Method exercises Without IF. Setup Create one new project to hold all of these. In that project, create an empty class called WorkIt to hold all of your.
Abstract Classes and Interfaces
Exam 2 Review. variable types boolean - true or false String - "hello" int - 14 double
Games and Simulations O-O Programming in Java The Walker School
Graphical Tree-Based Scientific Calculator: CalcuWiz Will Ryan Christian Braunlich.
Chapter 5 - Making Music: An On-Screen Piano
Real World Programming BBrewer Fall Programming - Bellwork 1.Log on 2.Go to edmodo 3.Open & Save Vocabulary Graphic Organizer and Analaysis Document.
Java for Robots How to program an NXT robot with a Java Brain Bert G. Wachsmuth Seton Hall University.
Study Guide For Test Chapter 5, 6,& 7 Test is Friday, May 15th.
Greenfoot. Getting Started Open the Greenfoot download site: Select Greenfoot
C++ Basics Structure of a Program. C++ Source Code Plain text file Typical file extension .CPP Must compile the C++ source code without errors before.
CSE 113 Introduction to Computer Programming Lecture slides for Week 2 Wednesday, September 7 th, 2011 Instructor: Scott Settembre.
Week 6 - Wednesday.  What did we talk about last time?  Exam 1 post-mortem  Recursive running time.
Chapter 1 - Getting to know Greenfoot
Functions Top-down design Breaking a complex problem into smaller parts that we can understand is a common practice. The process of subdividing a problem.
Lecture 4. Greenfoot 1 Pablo Romero, Department of Informatics Greenfoot Programming simulations and games in Java.
Greenfoot Game Programming Club.
Lesson 1: Writing a program. Java Java is a programming language Computer cannot understand it, though it can be translated ( compiled ) so a computer.
Lesson 2: Reading a program. Remember: from yesterday We learned about… Precise language is needed to program Actors and Classes Methods – step by step.
Kakihijau.googlepages.com Introduction To Greenfoot Part-2.
Building Java Programs Chapter 8 Lecture 8-3: Object state; Homework 8 (Critters) reading:
Introduction To Greenfoot
1 An Introduction to Dreamweaver and PHP Part B: Some introductory PHP and JavaScript.
Martin T. Press.  Main Method and Class Name  Printing To Screen  Scanner.
Unit 6 Motion – Air Hockey Evangel College S.2 ICT.
Today’s lecture Review of chapter 8 Go over examples.
Chapter 2 – The Little Crab Program:. Little Crab Scenario Inheritance: The Arrows Denote Hierarchy Crab is an Animal Animal is an Actor Therefore, It.
Improving the Crab Mrs. C. Furman August 19, 2010.
Objective Write simple computer program in C++ Use simple Output statements Become familiar with fundamental data types.
Adding and Eating Worms Mrs. C. Furman August 23, 2010.
1 Structure of Simple C++ Program Chapter 1 09/09/13.
COSC 1223 Computer Science Concepts I Joe Bryan. What is a function? Like a mini-program that performs a specific task Two types: Built-in functions Functions.
Notices Assn 2 is due tomorrow, 7pm. Moodle quiz next week – written in the lab as before. Everything up to and including today’s lecture: Big Topics are.
Georgia Institute of Technology More on Creating Classes Barb Ericson Georgia Institute of Technology June 2006.
Python Programming Module 3 Functions Python Programming, 2/e1.
Selection Statement Chapter 3. A Java Language Program Is a Class A Class has data declarations and methods A Method has statements or instructions to.
Chapter 4 - Finishing the Crab Game
Chapter 4 - Finishing the Crab Game
Interlude 2 - The Greeps Competition
Chapter 3 – Improving the Crab Game
Creating Games with Greenfoot
Version 2.
The Little Crab Scenario
Platformer Java Guide by Mr. Monroe.
Defining Class Member Data/characteristics
Adding Behaviors (methods)
Methods, Data and Data Types
More on Creating Classes
WJEC GCSE Computer Science
Presentation transcript:

Test review

When? Monday 9/27 in class

Know Greenfoot How many classes? Top-most classes? What does each button do? Lowest child class?

Read code public class Crab extends Animal { public void act( ) { checkAtEdge( 12 ); randomTurn( ); eatWorm( ); checkKeyPress( ); move( ); } // end act() method Class name? Class parent? Method name? Method return type? Method calls? Method that contains information to be passed? Comment?

checkAtEdge( 12 );What is this? What info is sent TO the method? What TYPE of info?

import greenfoot:What is this? Library name Give an example of it’s use

Greenfoot.getRandomNumber( limit ); How would you get a random number in the range ? Write an if statement to do something 25% of the time.

If statements and greenfoot Write code to... Do something 45% of the time Check if the left cursor key is pressed Turn 17 degrees at the world edge Eat a worm, including the if statement

Bracket rules Follow class definitions, method definitions, if statements Always paired { }

Semi-colon rules Not placed where brackets are used (class and methods definitions, if statements) Everywhere ELSE

import greenfoot.*; // Kills aliens public class Halo extends Actor { public void act() { setLocation( 100, 200 ) ; if( getSize( ) < 10 ) { killAlien( ); } move( ); } public void killAlien( ) { eat( Alien.class ); } How many steps? How many methods defined? How many methods called?

Identify errors... public class void Animal extends Crab ( ) { public boolean act( ); { if ( x < 10 ) { move; }