100 likes | 240 Vues
Vocabulary. Programming Vocabulary. Watch closely, you might even want to take some notes. There’s a short quiz at the end of this presentation!. Jeroo is a fun program. You get to make things hop around an island on a great variety of adventures.
E N D
Programming Vocabulary • Watch closely, you might even want to take some notes. There’s a short quiz at the end of this presentation! • Jeroo is a fun program. You get to make things hop around an island on a great variety of adventures. • In the process you’ll learn a lot about programming.
Essential Concepts • In Jeroo you will write your own programs. You’ll type in the instructions to make Jeroos follow your commands. The code you type in is called your source code. • Definitions: • Program– a set of instructions for the computer • Source code – a program written by a programmer in a programming language
TRANSLATING • The computer cannot really understand the source code you type in. It has to be translated into something much simpler that a computer processor can understand. The compiler will turn your program into a form that can be processed. • Definitions: • Compiler – translates a program (or class) as a whole into another form such as byte code or machine code • Java Byte Code – intermediate language created by the Java compiler. The JVM translates byte code into machine code. • Machine Code – program in the form of binary codes - a series of 1’s and 0’s - that are understandable by the computer’s CPU
One really nice thing about Jeroo is that it has an interpreter. It translates your source code one line at a time and tells the Jeroo to follow your instructions one at a time so you can see it working. • Definition: • Interpreter – translates a program into machine language one statement at a time
Essential Concepts • Before you can write a program, you should have a plan. This is your algorithm. Then you have to type in your instructions following the syntax of the language you are using. Jeroo uses Java syntax like this: • Definitions: • Algorithm – a plan for solving a problem • Syntax – a set of rules for writing or speaking a language • Semantics – the meaning associated with valid expressions
Essential Concepts - OOP • A Jeroo is an object. There are things you know about it, its properties, that can change, such as where it is and how many flowers it has, and there are the methods which are things it can do. • Definitions: • Object – represents a specific concept or item that is relevant to a problem to be solved. There are 3 parts to an object, facts about the object, how it is created, and tasks it can perform. • Attribute – is a fact associate with a specific object. Also known as a property or instance data. • Behavior – is an action an object can perform in response to a request from an external source. You write code to turn a behavior into a method.
Essential Concepts - OOP • Method – a collection of statements that are written in some programming language to describe a specific behavior • Method Precondition – something that is assumed to be true before the method is invoked • Method Postcondition – something that is assumed to be true after the method has been executed
Essential Concepts - OOP • Class – is a collection of statements that are written in some programming language to describe both the attributes (properties) and the behaviors (methods) of an object. • Instantiation – the process of creating a specific object.Jeroo clyde = new Jeroo();clydeis an instance of the Jeroo class.This is also called constructing an object. Construct = Instantiate
Compiler Object Algorithm Byte code Interpreter Syntax Attribute Source code Instantiate Method A plan for solving a problem Translates one line of code at a time To create a new object in your program. Rules of how a language must be written. Something an object can do Part of a program that describes how an object can accomplish a particular behavior. Translates a whole program all at once The code you, the programmer, type in The code the computer understands One thing you can use in your program that has attributes and methods Review for QUIZ – Match words with definitions