65-lecture08 - Computer Science 65 Intro to CS February 19,...

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

View Full Document Right Arrow Icon
Computer Science 65 Intro to CS February 19, 2008 Loops Assignment #4
Background image of page 1

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

View Full DocumentRight Arrow Icon
Announcements How to turn off “helpful” boxes in Eclipse Window→Preferences → Java → Editor → ContentAssist Assignment #3 is graded Comments are on blackboard
Background image of page 2
Reaction from Assignment #3 Declare variables of same data type on the same line Instead of: int quantity; int pennies; int quarters; int dimes; Do this: int quantity, pennies, quarters, dimes;
Background image of page 3

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

View Full DocumentRight Arrow Icon
What can we do so far? Review Declare and use variables String int, double, char,… Print out statements, get input from user System.out.println Scanner Dialog boxes Use if-statements, if-else statements Loops While loops For loops
Background image of page 4
Background image of page 5

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

View Full DocumentRight Arrow Icon
Assignment #4 The required portion of the assignment is a one- dimensional version of the game First prompt the user for an integer between 0 and 9. Then, use a loop to display a map with an ‘X’ representing the location of the battleship, and a ‘O’
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 15

65-lecture08 - Computer Science 65 Intro to CS February 19,...

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

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