Monday, October 17, 2011

Elaine Lapham Memorial Scholarship


The Brookdale Community College Foundation has announced that The Elaine Lapham Memorial Scholarship is available for the spring 2012 semester. The scholarship is in the amount of $500.

WebAdvisor - interval 3

Today is the end of the third WebAdvisor monitoring interval. Students with attendance issues, poor homework performance, and/or missing assignments should take this warning seriously.

Homework 3 - guess

You are to write a program that calculates a random number from 1 to 10. Ask the user to guess the number. If the user guesses correctly, display a congratulatory message. If the user displays an incorrect answer, give the user two more tries. If after three attempts the user still has not guessed the number, display a message to that effect and terminate the program.

Friday, October 14, 2011

Public service announcement #2

Notice to all students:

Though it does not affect our Comp137 class, Brookdale is NOT closed on Veterans Day. If you have Friday classes this semester, you have school on Friday, November 11th.

Newlines

It isn't necessary to write multiple cout statements when you want a line break. This code

cout << endl;
cout << "Your random # is " << num << "." << endl;
cout << endl;


could be rewritten using the newline character, \n

cout << "\nYour random # is " << num << ".\n"
     << endl;


These two code snippets generate the same output:

Homework 2 - random number -
      alternate input option

If you would like to write an enhanced version of the second homework assignment, you can read in a char (instead of an int) and you can switch on the character entered. If you apply the tolower() function to that input character, you can make your program transparently deal with case sensitivity:

c = tolower(c);

Wednesday, October 12, 2011

Brookdale 5K

Notice to all students:


The first annual Brookdale Community College 5K run/walk to raise money for scholarships for the International Center Study Abroad Program is scheduled for Sunday, October 30th at 9:00 at Thompson Park. The cost is $25, and if you register before the 14th it includes a commemorative T-shirt. All of the donations go to the program.

You can download a race application here and a sponsorship form here.