Difference between revisions of "IB Computer Science I"

From WLCS
Line 1: Line 1:
== Monday (5/3/10) ==
+
== Thursday - Friday (5/6/10 - 5/7/10) ==
 +
'''Agenda:'''
 +
* Be able to demo all Java programs
 +
* Mr. Bui will check [[Weapon class assignment]] and [[Creature class assignment]] for completion on Friday (5/7/10)
 +
* Work on [[Creature Combat Game]]
 +
* If you have finished [[Creature Combat Game]], then being looking at [[Java Arrays Assignment]]
 +
 
 +
== Monday - Wednesday (5/3/10 - 5/5/10) ==
 
'''Warmup:'''
 
'''Warmup:'''
 
# Create a new file named Warmup_5_3_10.java
 
# Create a new file named Warmup_5_3_10.java

Revision as of 09:34, 6 May 2010

Thursday - Friday (5/6/10 - 5/7/10)

Agenda:

Monday - Wednesday (5/3/10 - 5/5/10)

Warmup:

  1. Create a new file named Warmup_5_3_10.java
  2. Prompt the user for an integer and store it in a variable n
  3. Create a boolean variable named isPrime that starts with true
  4. Write a for loop that starts at 2 and goes up to n
    1. Check if n can be evenly divided by the counter variable (Hint: n % x == 0)
      • If n divides the counter variable, then change isPrime to false
  5. Outside after the loop, check if isPrime is true
    • Print out a message that says that "the number n is prime"
  6. ...otherwise, print out a message that says it is not

Agenda:

Be sure you have demoed or can demo the following:

Archives