December 4, 2009

Exam 2 handed back today

Questions

Evaluating Expressions

Display the next game from the array with the following javascript

	var day = 4; //current day
	var month = 11; //current month
	var year = 2009; //current day

	var games = new Array(
	"Ohio State,Away,11,19,2009",
	"California or Syracuse,Away,11,20,2009",
	"Gardner-Webb,Home,11,23,2009",
	"Nevada,Home,11,29,2009",
	"Michigan State,Home,12,1,2009",
	"Kentucky,Away,12,5,2009",
	"Presbyterian,Home,12,12,2009",
	"Texas,Away,12,19,2009",
	"Marshall,Home,12,22,2009",
	"Rutgers,Home,12,28,2009",
	"Albany NY,Home,12,30,2009",	
	"College of Charleston,Away,1,4,2010",
	"VA Tech,Home,1,10,2010",
	"Clemson,Away,1,13,2010",
	"GA Tech,Home,1,16,2010",
	"Wake Forest,Home,1,20,2010",
	"NC State,Away,1,26,2010",
	"Virginia,Home,1,31,2010",
	"VA Tech,Away,2,4,2010",
	"Maryland,Away,2,7,2010",
	"Duke,Home,2,10,2010",	
	"NC State,Home,2,13,2010",
	"GA Tech,Away,2,16,2010",
	"Boston College,Away,2,20,2010",
	"Florida State,Home,2,24,2010",
	"Wake Forest,Away,2,27,2010",
	"Miami,Home,3,2,2010",
	"Duke,Away,3,6,2010");
	

November 20, 2009

Java Assignment due today

Exam on Monday

Today is just for questions and review about these


November 13, 2009

Review Arrays

  • How do you access an element in an array?
  • Adding a new element to an array
  • Searching an array
  • Adding an element to an array only if it's not already in the array
Example to Complete In Class

Review Scope

  • What is scope?
  • What is a global variable?
  • How do you hide variables?

Java

  • Creating a class
  • Inheritance
  • Abstract classes

November 6, 2009

Pop non-quiz: Build a java class

Questions about the upcoming assignments

Javascript

  • Adding an element to the end of an array
  • Changing an image Solution
  • Commenting your code

//What does the function do in English?
function method(a, b, c, ...){
// Parameters: What are a, b, c, etc?
// Returned value: What does the value that method returns correspond to?
// Restrictions: What can't the user do when running this function?
// Errors checked for: What errors did you check for and then fix?

Java

  • Creating a student class
  • Commenting your code

October 30, 2009

All homework assignments are available online for the rest of the semester
The next assignment is a search assignment due November 13th (a Friday)

Today we will:

  • Install the most current version of Java SDK
  • Make sure jGrasp is installed properly
    • The tutorial for installing is here
  • Work through some sample Java

October 16, 2009

Go over the exam

Any questions about the mortgage assignment?

Going over arrays

  • The most fundmental way of traversing array: the for loop
  • Examples to complete
    • Display all elements in an array
    • Display only the numbers in an array (You may want to check out typeof for this)
    • Display the sum of all numbers in an array
    • Find the max number in an array

October 8, 2009

Questions about the assignment?

Break into groups to do the following

  • Create a loop to display 1 through 9. Solution
  • Create a loop to display the even value of 1-9 (There are two ways) Solution
  • Create a function to tell whether a number is prime (Hint: you can use %)
  • Display all primes 1-100
  • Display the 100th prime
  • Create a function to make a checkerboard of white and black buttons of size m x n. (m rows and n columns) Solution

October 2, 2009

Plan for today

September 25, 2009

Same as last week:

  • Students with last name A-K stay in room SN014.
  • Students with last name M-Z go to SN011.

Plan for today

  • How to turn in assignments
  • Review Loops
  • Build some simple loops
  • Loops within loops
  • More advanced loop examples
  • Review Variables examples

September 18, 2009

Your first assignment is graded at the front of the room.

Pick up a handout for today from the front of the room or here

Students with last name A-K stay in room SN014.
Students with last name M-Z go to SN011.

What we will do today

September 11, 2009

Two Problems

Try to upload something into the AFS!

  • If still have problem, see here