CIS 122
Alg. & Pgmg

Spring 2009

Instructor:

Gary Bricher


Home

Syllabus

Schedule

Assignments

http://www.cs.uoregon.edu/classes/04S/cit281/gif/pointer.gifAnnounce

Links

Notes


http://www.cs.uoregon.edu/classes/04S/cit281/gif/UOseal112x112.gif

Announcements

Check this page during the term for special announcements and corrections.

·        Welcome to CIS 122.  Read the syllabus and schedule pages.

·        Lab sections will start the first week of the term.

·        To upload your Projects for grading, in Blackboard click Course Documents then scroll all the way down and open the Projects folder.

·       If you have problems with the command prompt window disappearing after displaying output, you may add this line just before “return 0;”

                    system(“pause”);

      This will keep the window open until one presses a key.

·        Project 2 hint – Regarding the boolalpha flag you’re asked to use in Project 2, the following short example makes clear what it is doing:

#include <iostream>

using namespace std;

int main(){

  bool bvar;

  bvar = true;

  //output default 1 for true

  cout << bvar << endl;

  //now use boolalpha flag to output "true" for true

  cout << boolalpha << bvar << endl;

  return 0;

}

  • Project 2 hint continued – The boolalpha.cpp example referenced in the bootalpha flag link has an if statement that can be understood if one realizes that the cin >> bvar input line wants a 1 or 0 input, not true or false.  This part of that example program is not needed to do Project 2 however.
  • 04/05/09 - Project 1’s Extra Credit section had two wrong dates for Monday and Friday.  These have now been corrected.
  • 04/10/09 – There is a Project 1 hints handout now available here Project 1 Hints
  • 04/12/09 – In Project 1, use the specification for the toUC.cpp program indicated in the text regardless of the name for the program you are asked to use, that is, the program should convert from upper case to lower case.
  • 04/21/09 – The instructor didn’t realize until yesterday that his uoregon.edu email account was not autoforwarding to his cs.uoregon.edu account.  This has now been corrected.  The uoregon.edu account is the one used by Blackboard, so if you sent the instructor messages earlier via Blackboard he did not see them till now and is working through this inbox.  However, if there is an urgent issue you should resend a message at this point.
  • 04/26/09 – The Midterm Exam study guide and practice exam are now available from the Schedule page.
  • 04/30/09 – A hint for Project 3A follows.  In Exercise 4.1, you are asked to generate random integers between 1 and 15.  If you recall from our discussion in class and from pp. 82-83, one may generate a random integer between 0 and 9 with the command rand() % 10 (after seeding the rand function).  This is because when one divides an integer by n the result is a remainder between 0 and n-1.  As another example, if one divides an integer by 20 the remainder would be an integer between 0 and 19.  Now, if you have a technique for generating a random number between 0 and n-1, couldn’t you just add one to that number to produce one between 1 and n?
  • 05/07/09 – The Midterm Exam distribution graph and statistics document may be found from the Schedule page in the Midterm Exam block.   Your Midterm Exam may be picked up in class at the lecture section.
  • 05/09/09 – There is now a “Weighted Percentage” column on the Blackboard grades page that shows your course percentage so far based on the weights specified in the syllabus.  This percentage currently includes Projects 1, 2, 3A, and the Midterm Exam.
  • 05/18/09 – Due date for Project 4 postponed to 05/26/09.