CS141: Topics for Week 5: Sept 21, 23 & 25, 2015


Computer Science Headlines

ACM Tech News

Lab

Lab 4: Expert Systems

Remember to review questions starting on p. 268.

Game Program

Game Program Netbeans Project (zip)

Chapter 4 Decision Structures: Vocabulary

Types of Decision Structures:
  ... if statement
  ... if-else statement
  ... multi-way if-else
  ... nested if-else
  ... switch statements
  ... indentation conventions
Code blocks & variable scope


Decision Structure Syntax:
  ... decision logic and flow charts
  ... condition and body
  ... boolean value, expression

Random numbers


Building Boolean Expressions:
  ... relational operator (<, >, <=, >=, ==, !=)
  ... boolean (logical) operators (!, &&, ||)
  ... boolean operators precedence (See table)
  ... truth tables (e.g. Tables 4-6,4-7,4-8)
  ... De Morgan's Laws

String Comparison
  ... Lexicographic ordering (of Strings)
  ... compareTo() and .equals operators

Other (optional)
  ... The Conditional Operator bool ? val1 : val2
  ... Switch statement (p. 238)
  ... DecimalFormat (p. 248)

Topics:

In Class Practice Activities