//----------------------------------------------------------------// Determines if the specified word begins with a particular // two-character consonant blend. //----------------------------------------------------------------private static boolean beginsWithBlend(String word) { return ( word.startsWith ("bl") || word.startsWith ("sc") || word.startsWith ("br") || word.startsWith ("sh") || word.startsWith ("ch") || word.startsWith ("sk") || word.startsWith ("cl") || word.startsWith ("sl") || word.startsWith ("cr") || word.startsWith ("sn") || word.startsWith ("dr") || word.startsWith ("sm") || word.startsWith ("dw") || word.startsWith ("sp") || word.startsWith ("fl") || word.startsWith ("sq") || word.startsWith ("fr") || word.startsWith ("st") || word.startsWith ("gl") || word.startsWith ("sw") || word.startsWith ("gr") || word.startsWith ("th") || word.startsWith ("kl") || word.startsWith ("tr") || word.startsWith ("ph") || word.startsWith ("tw") || word.startsWith ("pl") || word.startsWith ("wh") || word.startsWith ("pr") || word.startsWith ("wr") ); } } Code\Chap5\PigLatinTranslator.class Java Foundations, 3rd Edition, Lewis/DePasquale/Chase 5 - 14
View full slide show




//----------------------------------------------------------------// Determines if the specified word begins with a particular // two-character consonant blend. //----------------------------------------------------------------private static boolean beginsWithBlend(String word) { return ( word.startsWith ("bl") || word.startsWith ("sc") || word.startsWith ("br") || word.startsWith ("sh") || word.startsWith ("ch") || word.startsWith ("sk") || word.startsWith ("cl") || word.startsWith ("sl") || word.startsWith ("cr") || word.startsWith ("sn") || word.startsWith ("dr") || word.startsWith ("sm") || word.startsWith ("dw") || word.startsWith ("sp") || word.startsWith ("fl") || word.startsWith ("sq") || word.startsWith ("fr") || word.startsWith ("st") || word.startsWith ("gl") || word.startsWith ("sw") || word.startsWith ("gr") || word.startsWith ("th") || word.startsWith ("kl") || word.startsWith ("tr") || word.startsWith ("ph") || word.startsWith ("tw") || word.startsWith ("pl") || word.startsWith ("wh") || word.startsWith ("pr") || word.startsWith ("wr") ); } } Code\Chap5\PigLatinTranslator.class Java Foundations, 3rd Edition, Lewis/DePasquale/Chase 5 - 29
View full slide show




Place Title Here Enter word or phrase here Enter word or phrase Enter word or phrase Enter word or phrase Enter word or phrase here Enter word or phrase here Enter word or phrase Enter word or phrase Enter word or phrase Enter word or phrase here Enter word or phrase here Enter word or phrase Enter word or phrase Enter word or phrase Enter word or phrase here Enter word or phrase here Enter word or phrase Enter word or phrase Enter word or phrase Enter word or phrase here Enter word or phrase here Enter word or phrase Enter word or phrase Enter word or phrase Enter word or phrase here
View full slide show




The Importance of Context  Context 1. The part of a text or statement that surrounds a particular word or passage and determines its meaning. 2. The circumstances in which an event occurs; a setting.
View full slide show