creating an inventory of java...
TRANSCRIPT
Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
2Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
What Will I Learn?Objectives • 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
3Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Why Learn It?Purpose Think about the first time you played a video game. You had to learn how to use the controller and what moves to make to participate in the game. Once you learned those concepts, you could then apply that knowledge to additional games or use that knowledge as a base for learning more games.
This lesson reinforces what you know up to this point and prepares you to build upon that knowledge.
4Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Programming Concepts and TermsA computer program is: • A sequence of instructions• Tells a computer what to do
Learning to program is: • Thinking about and capturing a sequence of
instructions• Breaking down a problem into smaller tasks• Writing comments to inform other programmers
5Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Alice 3 Concepts and TermsIn Alice 3:• Animation of 3D objects take place in a virtual world• Galleries contain 3D objects that move in 6 directions• An Object has an orientation• A scenario describes an overall animation• A storyboard can be visual or textual• A program consists of lines of code• Program code is structured in blocks (Do together)• Functions provide properties of an object• Functions can be used to compute a value• Boolean functions return true or false
6Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Alice 3 Concepts and TermsIn Alice 3:• 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
7Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Greenfoot Concepts and TermsIn Greenfoot:• Scenarios consist of a set of classes• Objects are created from a class• Objects placed in a world are known as actors• Objects have methods• Method return types specify what a method will return• Void return types return nothing• Parameters are used to pass data to a method• Parameters have types (int, boolean)• Signatures are a specification of a method• A subclass is a specialization of a class• Every class is defined by source code
8Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Greenfoot Concepts and TermsIn Greenfoot:• Source code must be compiled • Dot notation is used to call a static method in another
class• Methods belonging to classes use the static keyword in
their signature• Methods can be defined for a new action• New methods are called after they are defined• Comments are ignored by the computer• Constructors are a special kind of method• Fields (instance variables) are used to store
information• The double equal symbol = = is used to test equality• if/else execution is based on a given condition
9Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Java Programming Terms
• If/Else instruction• Implement• Instruction• Loop• Method• Nesting• Property• Pseudocode• Relational operator• Repetition• Runtime• Scenario• Storyboard• Syntax• Test
Programming Terms:• Algorithm• Argument• Boolean value• Bug• Comment• Condition• Conditional execution• Control structure• Count• Decision• Design• Event• Expression• Function
10Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Recognize Java Program Constructs Name the constructs in this Alice 3 example.
1
2
3
11Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Recognize Java Program ConstructsName the constructs in this Greenfoot example.
1
2
3
12Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Recognize Java Program ConstructsName the constructs in this Java code.
3
2
1
13Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Recognizing Java Syntax ErrorsKeys to recognizing Java program syntax errors:• Learn the parts of a method signature.• Recognize when symbols such as quotes and semi-
colons are missing.• For every opening parenthesis there must be a closing
parenthesis.• For every opening curly brace there must be a closing
curly brace.• Inspect capitalization and spelling of variables.
Look again!
14Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Tasks for Designing a Game Create a game to solve a problem. The game could have a simple concept, such as being the first player to journey through a path of obstacles successfully.
Problem Solving Process
Step 1: Define the Problem
Step 2: Design and Develop a Solution
Step 3: Program and Implement the Solution
Step 4: Run, Test and Revise the Solution
15Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Define the Problem
Game Element DescriptionScenario Be the first player to reach the end of the trail
cluttered by obstacles.Scene Pathway with obstacle images impeding the path. Objects in the Scene Pathway, fallen trees, rock slides, flowing rivers,
herd of buffalo, snow slides, stuck trucks Player's Actions Travel along pathway
Reach an obstacleSelect tool from bag to resolve the obstacleResolve the obstaclePut tool back into bag and continue on path
16Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Add Interesting Features As you define the game, think about the details that will make the challenge interesting: • Multiple scenes, actions and objects • Interactivity controlled by keyboard or mouse • Tracking scores
17Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Design and DevelopDesign the:• Scenario• Actors• Obstacles• Methods• Conditions• Repetitions• Score keeping• Keyboard interactions
Develop the:• Solution• Sample data• Messaging• Documentation
18Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Use a Project Plan to Track Progress
Project Plan Component Additional DetailsDefine the Problem
Design the Game ● Scenario, actors, obstacles● Methods, conditions, repetitions● Score-keeping, keyboard interaction
Develop and Implement the Game
● Scenario, actors, obstacles● Methods and variables for score keeping
Execute the programPerform Quality Assurance Testing and Revisions
Present the Problem and Solution
Quality Assurance Testing can be defined as a systematic process of checking to see whether a product being developed is meeting specified requirements.
19Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Project Plan ComponentsProject plans should include:• Task list• Task duration (start and end dates)• Task resources• Task dependencies
Task Start End Resource DependencyDesign Actors
15-Nov-2011 30-Dec-2011 Caron Scenario design
20Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Quality Assurance (Q/A) StagesSoftware testing activities or stages include:
Requirement analysis
Test planning
Test case
development
Environmentsetup
Test execution
Test cycleclosure
21Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Quality Assurance Tasks Quality assurance tasks in each stage:
Software Testing Stage TasksRequirements Analysis ● Listing the type of tests to perform
● Prioritizing and focusing tests● Automation feasibility
Test Planning ● Writing test plan strategy● Selecting test tools● Estimating time required for testing● Training
Test Case Development ● Creating tests● Identifying test data and baseline data
Requirement analysis defined as a process for determining user expectations.
Test case can be defined as a set of conditions or variables with which a test engineer will determine if a software program is working correctly.
22Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Quality Assurance Tasks Quality assurance tasks in each stage:
Software Testing Stage TasksEnvironment Setup ● Set up hardware and software
environment
Test Execution ● Execute test plans● Document results● Retest fixes
Test Cycle Closure ● Qualitative and quantitative customer reporting
Test execution is defined as the execution of the same test against many parts of a software program (interface, business logic, web layer, etc.)
A test cycle is a set of defined start and stop points in a quality assurance program.
23Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
Examples of Software Testing Variations
Software Testing Variations
Tasks
Change the environment ● Change the operating system● Change the browser● Change the display settings● Change the fonts
Change the execution ● Change the keystrokes used● Change the capitalization used● Start, stop, and pause the execution
Change the data ● Input numbers when characters are expected● Input characters when numbers are expected● Input symbols and varying amounts of data input
24Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
TerminologyKey terms used in this lesson:Quality Assurance TestingRequirements AnalysisTest caseTest executionTest cycle
25Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
SummaryIn this lesson, you learned how to: • 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
26Copyright © 2012, Oracle. All rights reserved.
Creating an Inventory of Java Fundamentals
PracticeThe exercises for this lesson cover the following topics:• Matching Java Programming terms to a definition• Recognizing Java programming constructs• Identifying incorrect syntax• Writing a project plan for designing a game• Writing a Q/A test plan