1 / 9

Greenfoot B4

Greenfoot B4. Rest Day #1. The Tour De France. Even professional cyclists need a couple of rest d ays But they aren’t really rest days and they will be: Going on training rides Seeing their Masseurs and Physios Eating lots Watching reviews of stages past . Driving future stages.

skyler
Download Presentation

Greenfoot B4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Greenfoot B4 Rest Day #1

  2. The Tour De France • Even professional cyclists need a couple of rest days • But they aren’t really rest days and they will be: • Going on training rides • Seeing their Masseurs and Physios • Eating lots • Watching reviews of stages past. • Driving future stages

  3. Today’s Objectives • Complete ALL the objectives so far. • Understand the theory from previous lessons: • Classes • Objects • Methods • Ifs • Random Numbers • Using images we like we will have created a theme that we are happy with.

  4. Classes Definition Creating a new class Right click on Actor and select SubClass Give it a name starting with capital letter • A Class is a type of something. • It is a template used to create new object of that class. • Example: • we are all humans. • we belong to the class called humans. • All objects or things with in a class will share similar: • Characteristics or Properties. • Behaviors or Methods.

  5. Objects Objects Creating objects. Right click and select new Frog() or whatever the name of your class is. Now you can position on the stage Or Select an Actor Class Hold shift and click somewhere on the stage. Don’t forget Right click on the stage and select Save the World to remember the objects you’ve added and their positions. • An object is an instance of a class. • Example • You are an instance of Human • Therefore you are an object of type human. • You could also be an object of type student or an instance of the student class • Sounds a bit odd, but you’ll get use to it.

  6. Methods

  7. IF Statements

  8. Random Numbers

  9. Homework • Make a blog post titled 5 rules of good programming. • Make sure you include techniques such as: • Using comments to explain code in plain english; • Using sensible names for objects and variables that explains what they are; • Describe modular programming that uses methods to break down problems into easy to solve ones. • Make sure you explain why good programming is important – what could go wrong! • Due – unless your teacher says otherwise its due NEXT LESSON!

More Related