Lecture16 - Java Programming, 3e Concepts and Techniques...

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

View Full Document Right Arrow Icon
Java Programming, 3e Concepts and Techniques Chapter 4 Decision Making and Repetition with Reusable Objects (III) ICTN 2730 Lecture 16 02/18/2008
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Chapter 4: Decision Making and Repetition with Reusable Objects Assignments Read chapter 4 and lecture notes Homework 4 grades are available on Blackboard. Homework 4 sample solutions will be posted and discussed on Wednesday. Homework 5 is due Wednesday. The homework project must be completed independently. There is no group project in the class. Feel free to ask questions.
Background image of page 2
3 Chapter 4: Decision Making and Repetition with Reusable Objects Tip of the Day Java Code Conventions “The Code Conventions for the Java Programming Language document contains the standard conventions that Sun recommends . It covers filenames, file organization, indentation, comments, declarations, statements, white space, naming conventions, programming practices and includes a code example.” http://java.sun.com/docs/codeconv/html/CodeCo nvTOC.doc.html
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Chapter 4: Decision Making and Repetition with Reusable Objects Throw an exception Catch an exception
Background image of page 4
5 Chapter 4: Decision Making and Repetition with Reusable Objects Repetition Structure
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Chapter 4: Decision Making and Repetition with Reusable Objects The While Loop boolean done=false; while(!done) { System.out.print("Are you done? (yes or no) "); String answer=sln.next(); if(answer.equals("yes")) done=true; } System.out.print("Bye!\n"); Condition Action(s) True False
Background image of page 6
7 Chapter 4: Decision Making and Repetition with Reusable Objects The getSales() method
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Chapter 4: Decision Making and Repetition with Reusable Objects The getCode() method
Background image of page 8
Chapter 4: Decision Making and Repetition with Reusable Objects The Case Structure A type of selection structure that allows for more than two choices when the condition is evaluated Used when there are many possible, valid choices for user input The code evaluates the user choice with a which forces exit of the structure
Background image of page 9

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

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

Page1 / 30

Lecture16 - Java Programming, 3e Concepts and Techniques...

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

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