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.
·
Help Sessions – There will be special help sessions the
second week of the term in B26 Klamath for those who want extra help getting
started or got into the class late and missed the first lab section. The help sessions are as follows:
April 10, Thursday, 10-11am
April 11, Friday, 3-4pm
·
04/04/08 – Blackboard is now available for this course.
·
04/04/08
– In the lab outline for wk1, there were several references to CIS 110. These have now been corrected. Also, Project 1 had a couple October dates
in it and these have now been corrected.
You should use the latest version of these documents.
·
04/08/08
– The updated GTF office hours have now been posted to the syllabus.
·
04/10/08
– Another change to the GTF office hours have been posted to the syllabus.
·
04/16/08
– To upload your Projects for grading, in Blackboard click Course Documents
then scroll all the way down and open the Projects folder.
·
04/16/08
– For those wishing to use a Mac, there is a free IDE available from http://www.codeblocks.org which has
similarities to Visual C++. For
assistance with this product, see the GTF Brad Pitcher.
·
04/24/08
– 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;
}
- 04/24/08 continued – The
boolalpha.cpp example referenced in the 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/26/08 – The Midterm Exam study
guide and practice exam are now available from the Schedule page.
- 05/05/08 – The Midterm Practice
Exam available from the Schedule page has been updated because question
#7 has two corrrect answers.
- 05/10/08 – The Midterm Exam
distribution graph and statistics document may be found from the
Schedule page in the Midterm Exam block.
- 05/19/08 – For those who didn’t
pickup their Midterm Exam on the class day after the exam, you may pick
it up by coming to the instructor’s office during office hours.
- 05/19/08 - Project 4
findSalesSearch.cpp hints: Think about the binary search homing in on
the range of possible sales amounts rather than homing in on an element
in an array. The author mentions
on pg. 214 that the sales amount needs to be between 1 and COMMISSION_SOUGHT/0.08. This is because 8 percent is the
lowest commission rate and (sales amount) * (commission rate) =
(commission amount), that is, (sales amount) = (commission amount) /
(commision rate) and when commission rate is low the sales amount will
be high. Hence, if one uses the
binary search method and thinks of the low, high, and mid variables as
sales amounts, we could set low = 0 and high = (int) (COMMISSION_SOUGHT
/ 0.08) to be sure we are searching through the entire range. Note that your program could work with
sales amount in dollars rather than cents as in Listing 4.7 which is an
incremental approximation method rather than a binary search. Then loop while (low < high -1). One find’s the sales amount needed by
checking if mid >= 10001 in which case one could compute the
commission as is done in Listing 4.7 except use mid instead of
salesAmount in the formula (because mid is the provisional sales
amount). If mid is not >=
10001 then one could check if mid >= 5001, etc., like in Listing 4.7,
that is, we still want to use the logic at the bottom of pg. 114 for
computing the commission. Note
that if commission as computed above equals COMMISSION_SOUGHT (which is
the key in the binary search method) we’re done, but if commission <
COMMISSION_SOUGHT we set low = mid and if commission >
COMMISSION_SOUGHT we set high = mid.
Note also that we want to keep the program general in the sense
that the user could change the value assigned to COMMISSION_SOUGHT and the
program would still work.
- 05/26/08 - Project 4, Question 6,
sumSeries.cpp (optional extra credit) – There is a problem with the
statement of this problem. In
order to get the output listed in the Project 4 I/O spec and on pg. 177
of the text, the formula for m(i) should be m(i) = 1/2 + 2/3 + … +
(i-1)/i. If the formula at the
bottom of pg. 177 is used the output would be:
i m(i)
1 0.5
2 1.1667
…
We are giving
full credit for either approach taken by the student.
· 06/01/08 –
The on-line course evaluation for this class may be done by logging into
DuckWeb. It needs to be completed by
midnight 06/08/08.
·
06/01/08 – Project 4 answers available from
Blackboard at the bottom of Course Documents.
·
06/01/08 – The Final Exam study guide and practice
exam are available from the Schedule page.
·
06/03/08 – A small change to the review questions to
study section in the Final Exam Study Guide was made today. The current version is available from the
Schedule page.
·
06/05/08 – Question 4 in the final exam practice
exam should be A. A corrected version
of the file is now available on the servers.
|