When a class is compiled, the compiler checks to see whether there are any errors.Multiple instructions are executed in sequence, one after the other, in the order in which they are written.Additional information can be passed to some methods within the parentheses.The action is defined by a method of the object. A method call is an instruction that tells an object to perform an action. Used boolean type (a true or false value)Ĭoncept Summary From Introduction to Programming with Greenfoot by Michael Kölling Used with permission.Used if statement for conditional execution.Encountered a first glimpse of inheritance.Called methods with or without parameters.Summary of Programming Techniques From Introduction to Programming with Greenfoot by Michael Kölling Used with permission missing curly brackets Makes code much easier to read Indentation From Introduction to Programming with Greenfoot by Michael Kölling Used with permission Tip: Greenfoot will mark matching curly bracket when cursor is placed behind a curly bracket Use 4 spaces for one level of indentation (code after curly bracket) or the Tab key. From Introduction to Programming with Greenfoot by Michael Kölling Used with permission Exercise 2.12: Make your crabs turn at the edge of the screen Exercise 2.13: Experiment with different values for the parameter to the turn method Exercise 2.14: Place the move() statement inside the if-statement rather than after it. Syntax (form of if statement) if (condition).if statement can be used to write instructions that are executed only when a certain condition is true. If Statement From Introduction to Programming with Greenfoot by Michael Kölling Used with permission
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |