06-feb04

06-feb04 - COMP110 If/ElseandCaseStatements TabithaPeckM.S....

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

View Full Document Right Arrow Icon
COMP 110 If / Else and Case Statements Tabitha Peck M.S. February 4, 2008 MWF 3-3:50 pm Philips 367 1
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 New Homework Policy Incorrect submissions == lose a letter grade Three incorrect submissions == zero credit Check .jar files BEFORE you send them See me if you are still having problems Grades Lab 1, Lab 2, Project 1 Posting Grades online? Handing back grades? 2
Background image of page 2
Questions? 3 From Lab 2 No real problems Never got the same problem twice
Background image of page 3

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

View Full DocumentRight Arrow Icon
Gotcha == var1 = var2 (assignment statement) Error!!!!!!! var1 == var2 (boolean expression) Do NOT use == to compare Strings string1 == string2 //BAD string1.equals(string2); //GOOD 4
Background image of page 4
Gotcha (Syntax) if (boolean expression); DO NOT DO THIS!!!!!!!
Background image of page 5

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

View Full DocumentRight Arrow Icon
Today in COMP 110 More if / else statements Case statements 6
Background image of page 6
Tracing if / else code I give you code and input You give me output 7
Background image of page 7

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

View Full DocumentRight Arrow Icon
Example input = 5? input = 6? int days = 0;
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/02/2009 for the course COMP 110 taught by Professor Stotts during the Spring '08 term at UNC.

Page1 / 13

06-feb04 - COMP110 If/ElseandCaseStatements TabithaPeckM.S....

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

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