
Greenfoot / JF_V02_S03_L12
.pdf
Java Fundamentals
Creating an Inventory of Java Fundamentals
1Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Creating an Inventory of Java Fundamentals
Overview
This lesson covers the following topics:
•List and define Java Programming terminology
•Recognize and label Java programming constructs
•Identify incorrect Java programming syntax
•List programming tasks to design and implement a game using Java
•List five variations to include in programming Q/A tests
2Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Creating an Inventory of Java Fundamentals
Programming Concepts and Terms
•A computer program is a sequence of instructions that tells the computer what to do.
•Learning to program includes:
–Thinking about and capturing a sequence of instructions.
–Breaking down a problem into smaller tasks.
–Writing comments to inform other programmers.
3Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Creating an Inventory of Java Fundamentals
Alice 3 Programming Concepts and Terms
•In the animation development process:
–A scenario describes an overall animation.
–A storyboard can be visual or textual.
•Alice 3 objects:
–Are three dimensional.
–Are animated in a virtual world.
–Are created from a gallery of classes.
Move in six directions.
–Have their own orientation.
4Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Creating an Inventory of Java Fundamentals
Alice 3 Programming Concepts and Terms
•A program:
–Consists of lines of code.
–Is structured in blocks (Do together).
•Functions:
–Provide the properties of an object.
–Can be used to compute a value.
–When boolean, return a true or false value.
5Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Creating an Inventory of Java Fundamentals
Alice 3 Programming Concepts and Terms
•Conditional control structures:
–Use relational operators to compare boolean expressions.
–Are used to make a decision.
•Repetition control structures:
–Repeat a section of code based on a true boolean expression.
–Are referred to as loops.
6Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Creating an Inventory of Java Fundamentals
Greenfoot Concepts and Terms
•Greenfoot scenarios consist of a set of classes.
•Greenfoot objects:
–Are created from a class.
–Are placed in a world are known as actors.
–Have methods.
•Greenfoot classes:
–Are defined by source code.
–Have subclasses, which are a specialization of a class.
7Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Creating an Inventory of Java Fundamentals
Greenfoot Concepts and Terms
•Greenfoot methods:
–Signatures are a specification of a method.
–Use the static keyword in their signature if they belong to a class.
–Use dot notation to call a static method from another class.
–Can be defined for a new action, then called in the act method.
–Return types specify what a method will return.
•Void return types do not return data.
•Parameters:
–Are used to pass data to a method.
–Have types (int, boolean).
8Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Creating an Inventory of Java Fundamentals
Greenfoot Concepts and Terms
•Source code must be compiled.
•Comments are ignored by the computer.
•Constructors are a special kind of method.
•Instance variables, also known as fields, store information.
•The double equal symbol = = tests equality.
•IF-ELSE execution is based on a given condition.
9Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Creating an Inventory of Java Fundamentals
Java Programming Terms
• |
Algorithm |
• |
Implement |
• |
Argument |
• |
Instruction |
• |
Boolean value |
• |
Loop |
• |
Bug |
• |
Method |
• |
Comment |
• |
Nesting |
• |
Condition |
• |
Property |
• |
Conditional execution |
• |
Pseudocode |
• |
Control structure |
• |
Relational operator |
• |
Count |
• |
Repetition |
• |
Decision |
• |
Runtime |
• |
Design |
• |
Scenario |
• |
Event |
• |
Storyboard |
• |
Expression |
• |
Syntax |
• |
Function |
• |
Test |
• IF-ELSE instruction |
|
|
|
|
|
|
|
10Copyright © 2012, Oracle and/or its affiliates. All rights reserved.