ch07 - Alice in Action with Java Chapter 7 From Alice to...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Alice in Action with Java Chapter 7 From Alice to Java
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Alice in Action with Java 2 Objectives Write some first Java programs Learn the basics of the Eclipse Integrated Development Environment (IDE) Begin making the transition from Alice to Java
Background image of page 2
Alice in Action with Java 3 From Alice to Java The four steps of computer programming 1. Designing the program 2. Writing the program 3. Running the program 4. Testing the program Program development using Alice Step 1: Write user stories and construct storyboards Step 2: Add objects to world, animate with messages Step 3: Press the Play button Step 4: Scrutinize a number of executions
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Alice in Action with Java 4 From Alice to Java (continued) Benefits of program development using Alice 3D graphics let you visualize programming concepts Drag-and-drop coding reduces syntax errors Benefits of program development using Java Build reusable classes Run Java programs across various platforms Build applets to make Web pages interactive
Background image of page 4
Alice in Action with Java 5 Designing a First Java Program Use many techniques learned in Alice First step: write a user story to help setup structure User story for dollars-to-euros currency conversion Query user for dollar amount to convert to euros Read the dollar amount from the user Query user for euros-per-dollar exchange rate Read euros-per-dollar exchange rate Compute corresponding number of euros Display dollar and (computed euros values)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Alice in Action with Java 6 The Object List Review: class is blueprint for an object Procedure for isolating objects in the user story Identify the noun phrases (primary object indicators) Create a table listing nouns, values stored, and names The name should also be a noun (or noun phrase) The name should be descriptive If no Java type matches the value, define a class Naming convention Class: capitalize each word in the name Variable or method: capitalize each word except first
Background image of page 6
Alice in Action with Java 7 The Object List (continued)
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Alice in Action with Java 8 The Operations List Operations correspond to verb phrases in user story Procedure for isolating verbs in the user story Identify the verb phrases (primary operation indicators) Create a table listing verbs and matching operations There are five verb phrases in the user story
Background image of page 8
Alice in Action with Java 9 The Operations List (continued)
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Alice in Action with Java 10 The Algorithm Algorithm: sequence of steps that solve a problem Algorithm for converting dollars to euros 1. Display "How many dollars do you want to convert?" 2. Read dollars 3. Display "What is the euros-per-dollar exchange rate?" 4. Read eurosPerDollar 5. Compute euros = dollars * eurosPerDollar 6. Display dollars and euros, plus descriptive labels
Background image of page 10
Alice in Action with Java 11 Writing a First Java Program Integrated development environment (IDE)
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/27/2008 for the course INSY 3300 taught by Professor Wang during the Spring '08 term at UT Arlington.

Page1 / 56

ch07 - Alice in Action with Java Chapter 7 From Alice to...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online