[Skip Navigation] [CSUSB] / [CNS] / [CSE] / [R J Botting] / [CSE201] / index
[Text Version] [Syllabus] [Schedule] [Glossary] [Labs] [Projects] [Resources] [Grading] [Contact] [Search ]
Notes: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]
Labs: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10]
Fri Jun 14 09:25:18 PDT 2013
Opening the PDF files on this page may require you to download Adobe Reader or an equivalent viewer (GhostScript).

Contents


    CSE201 Introduction to Computer Science

      2013-06-14 Fri Jun 14 09:18 Final graded and first summary posted

      Look at [ grading/ ] to see if you have less than 300 points in the "Nonfinal" column of the summary... If so you may be able to improve your grade by going to the seminars today and by midnight tonight, sending me the usual short report by EMail.

      Note. There were some wide spread errors in the final. Please check page 117 in the text for the correct values for

       		false && false
      also many people missed the need to pass i by reference in the flip function.

      The raw summary scores did not give me any A's so, following the syllabus, I have rescaled the grades:
      Table
      DistributionA/A-B+/B/B-C+/C/C-D+/D/D-F
      Frequency1114421

      (Close Table)

      I will correct any errors you may spot... but other than seminars there is no way to improve your grade.

      2013-06-10 Mon Jun 10 14:55 Grades posted

      [ grading/ ]

      There are lots of complex things going on Thursday Friday... check my schedule/calendar [ ../plan.html ] if you need to see me.

      Note: no more than 300 points for points before the final, no more than 200 points in the final, and no bonusses to offset final points lost... All lab/assigned work submitted by the final!

      Best of luck.

      2013-05-31 Fri May 31 10:31 New grades posted

      [ grading/ ]


      Table
      #DateStudy before class & Revu(2 pt)Project Due(5 pt)Class(2 pt)Quiz(12 pts)Lab(10 pts)
      19 Tue 6/4 6.5 pp280-294 [ 19.html ] - Arrays - Vectors [ lab10/ ]
      20 Thu 6/6 Chapters 1-6 [ 20.html ] P9 Course Review pp1-304 -
      Final Thu Jun 13 Review all - 10-11:50 Comprehensive Final

      (Close Table)

      2013-05-24 Fri May 24 09:45 Latest grades posted

      [ grading/ ]

      2013-05-17 Fri May 17 14:05 Grades posted

      [ grading/ ]

      2013-05-16 Thu May 16 11:13 Class 14 example3 uploaded

      [ cardshark.cpp ] compiles and runs.... test and improve:-)

      2013-05-10 Fri May 10 11:37 Latest Grades posted

      Please check [ grading/ ] for errors.

      Next Week:
      Table
      #DateStudy before class & Revu(2 pt)Project Due(5 pt)Class(2 pt)Quiz(12 pts)Lab(10 pts)
      13 Tue 5/14 5.4-5.6 pp237-249 [ 13.html ] - Member Functions - Classes [ lab07/ ]
      14 Thu 5/16 5.7-5.8 pp249-253 [ 14.html ] P6 Data Fields and Review [ classes.html ] Q6 Classes [ lab07/ ]

      (Close Table)

      2013-05-06 Mon May 6 09:06 Grades corrected

      With thanks to the astute student who spotted this....

      2013-05-03 Fri May 3 08:23 Grades posted

      2013-04-26 Fri Apr 26 14:31 Grades posted and next weeks classes

      Please check [ grading/ ] for errors.

      Next Week:
      Table
      #DateStudy before class & Revu(2 pt)Project Due(5 pt)Class(2 pt)Quiz(12 pts)Lab(10 pts)
      9 Tue 4/30 4.1-4.5 pp159-175 [ 09.html ] - Functions - Loops [ lab05/ ]
      10 Thu 5/2 4.6-4.9 pp175-185 [ 10.html ] P4 Side effects and Scope Q4

      (Close Table)

      2013-04-19 Fri Apr 19 11:24 More Grades posted

      Please check [ grading/ ]

      The last day to drop is Monday next week...

      2013-04-12 Fri Apr 12 10:02 First Grades posted

      Go to [ grading/ ] and input your 3 word "pinWord". You will be shown your scores, your total, your percentage of the possible, and a grade calculated on your current scores. These are on a line with three stars.

      If your project score is less than 5 you can resubmit it next Thursday along with the second project.

      The commonest error in the project work was to misunderstand what the program was supposed to do and write perfect program that does something different.

      The quiz was done very well.... Thanks.

      2013-04-11 Thu Apr 11 12:54 Corrected dates of classes 15 and 16

      [ schedule.html ]

      2013-04-02 Tue Apr 2 17:26 Date of Final -- Thursday June 13th

      10-1150.

      2013-03-26 Tue Mar 26 12:15 Ready for spring quarter

      The schedule and syllabusses have been updated ready for the first class on April the 2nd [ ../syllabus.html ] (AV [ ../schedule.av.html ] ) [ syllabus.html ] [ schedule.html ]

      Items redacted below

      2013-03-25 Mon Mar 25 13:51 Final and course grades posted


      Table
      Grade DistributionA/A-B+/B/B-C+/C/C-D+/D/D-F
      Frequency31824310

      (Close Table)

      2013-03-07 Thu Mar 7 09:12 Code examples for Chapter 6

      Chapter 6 of the text refers to many examples like this
       	ch06/between.cpp
      I have uploaded them into [ ch06/ ]

      2013-01-31 Thu Jan 31 09:47 Exercise on calculating e done in last class

      [ 07ex3.cpp ]

      2013-01-22 Tue Jan 22 12:23 Common Error in Assigned work -- Test input before you use it -- not after

      A lot of people did Exercise R3.5 on Page 146 incorrectly. I should have covered the point in class previously.

      Never test for cin.fail() after using the data that was input. So a better bit of code would be

       		cin >> quarters;
       		if(cin.fail())
       			cout << "Input error.";
       		else
       			total = total + quarters * 0.25;

      2012-02-16 Thu Feb 16 12:49 Future projects -- show a typical run

      To help us grade your work, from now on, hand in a "script" that shows what your program does in addition to a listing of the program. Use this technique on our machines...
       		script
       		Q program_file
      Then tap D while holding down the CTRL key. Then open typescript in an editor to print it... or use
       		lpr typescript
      to print the script. You can use a screenshot on your home machine...

      2012-02-03 Fri Feb 3 10:30 Some answers to questions

        Random Fact 3.2 The Denver Airport Luggage Handling System

        Just for fun... try [ watch?v=xx8f4x6C_KY ] (YouTube, 2:28 mins) and then you can go to [ ?page_id=2086 ] which analyses why this system failed.

        Quality Tip 3.4 Don't use != to test for the end of a numeric range

        Notice however that in the next Common error an != is used because the loop is not counting items up to a particular value but searching a string for a particular value -- and this means we have to use "!=".

        When is the next seminar

        Look here [ ../seminar/ ]

      . . . . . . . . . ( end of section 2012-02-03 Fri Feb 3 10:30 Some answers to questions) <<Contents | End>>

      Just for Grins and Giggles

      This [ smiley.cpp ] came in from a FaceBook friend.

      2012-01-17 Tue Jan 17 07:41 Corrected syntax of constant declarations

      They must start with the word/lexeme "const" like this:
    1. constant_definition::= "const" type_name constant_name "=" expression ";"
       const int MINUTES_PER_HOUR = 60;
       const double INCHES_PER_FOOT = 12;
       const double TAX_RATE = 30.0/100.0;

      2012-01-12 Thu Jan 12 13:55 testing code

      In class I was asked about accessing a C++ compiler remotely. I demonstrated SSH and going thru
       		jbh3-1.cse.csusb.edu
      to a lab machine
       		jb359-n.cse.csusb.edu
      where n is a number.

      I couldn't remember the name and URL of a useful tool. It is called codepad and lets you paste in code, compile, and run it in a dozen languages including C++. Here [ http://codepad.org/ ]

       http://codepad.org/
      is the URL.

      2011-03-15 Tue Mar 15 14:44 FAQ -- What is the under score thing on page 290

      and can it be used anywhere else.

      Book shows

       		POWERS_ROWS
       		POWERS_COLS

      The "_" is used in identifiers to separate words. It makes identifiers more readable.

      You can use it any time you like.... but the wise programmer uses it to connect words into identiferis ... for example first_name and second_name are good. But fir_stna_me is evil!

      2011-03-15 Tue Mar 15 14:35 FAQ -- what is this about parallel vectors

      As a rule when you have two or more vectors that are (1)declared together, (2)have the same number of elements, and (3) each element is talking about the same object... then you have missed an oportunity to declare a class and have a single vector of objects of that class. Only newbies do this:-)

      For example, instead of

       		vector<string> first_name;
       		vector<string> second_name;
       		vector<string> phone;
       		vector<string> street;
       		vector<string> email;
      It is so much neater to write
       		vector<Person> people;
      plus a
       class Person
       {
       ...
       };

      The code may get a little longer but it will be a lot easier to understand and to change in the future.

      2011-01-31 Mon Jan 31 13:20 Linux Skills Are Hot in an Improving IT Hiring Front

      THis is for people who wonder why we use Linux in our labs.... It is a news item from the Assoication for Computing Machinary's TechNews
        (01/24/11) Katherine Noyes PC World

        The hiring environment for information technology (IT) professionals last year was the best it's been since 2000, according to a recent Challenger, Gray & Christmas report, indicating that the technology industry has been more resilient than most during the weak economy. "These firms are definitely on the leading edge of the recovery, as companies across the country and around the globe begin to upgrade and reinvest in their technology," says Challenger, Gray & Christmas CEO John A. Challenger. The proliferation of smartphones and tablets has played a large part in keeping the tech industry thriving. Forrester Research predicts that 2011 technology spending will increase 7.5 percent in the U.S. and 7.1 percent globally. Skills in Linux are in particular demand, according to Dice research. "More and more devices and systems and services are built based on Linux, and therefore, more and more manufacturers and vendors are looking for Linux talent," says Intel's Dirk Hohndel. Linux professionals also tend to get as much as 10 percent more in salary than other IT workers, according to Dice.


      View Full Article [ linux_skills_are_hot_on_improving_it_hiring_front.html ]

      2010-03-26 Fri Mar 26 14:37 First cut course grades and final posted

      The grades are complete except for errors and any bonus points that arrive before midnight Monday.

      Here is the grade distribution
      Table
      DistributionA/A-B+/B/B-C+/C/C-D+/D/D-F
      Frequency57841

      (Close Table)

      2010-03-18 Thu Mar 18 07:46 Extra Credit after final policy

      I don't normally do this but we have seminars scheduled for the Friday and the Monday after the final. More I'm planning to be off campus on Monday. I have to calculate and submit the grades no later than Tuesday morning.

      So here is my policy:

      1. Extra credit makes up for points lost BEFORE the final ONLY.
      2. Normally you submit reports before the next session.
      3. You must email me a short report on the presentations after the final by email on the night of the presentation.

      2010-03-17 Wed Mar 17 14:08 How do you copy a vector

      In class I wrote a solution on the board. Here [ copy.vector.cpp ] is a tested function that copies from one vector to another.

      2010-03-17 Wed Mar 17 13:02 Blank final posted

      [ 2010mock.htm ]

      2010-03-15 Mon Mar 15 13:30 Grades posted

      I've posted the latest grades. For your information at this time the grade distribution looks like
      Table
      A/A-B+/B/B-C+/C/C-D+/D/D-F
      610711

      (Close Table)

      2010-03-11 Thu Mar 11 09:41 Question about UML diagrams for projects

      The idea is that you add the UML diagrams to the printout of the program. You could even draw it by hand on the printout -- as long it is readable. If you do it on a separate sheet, staple it to the old printout.

      2010-03-04 Thu Mar 4 15:03 UML to code in Class 16 today

      In class students coded this UML diagram.

      [Horstmann page 244]

      The C++ code is on page 244 of the book.

      2010-02-15 Mon Feb 15 13:34 Assertions

      Exercises for today [ assert.cpp ] [ foobar.cpp ]

      2010-02-09 Tue Feb 9 14:21 Exercise in class today

      We developed [ circ.cpp ] today. Most of this code will appear in a future lab...

      2010-01-29 Fri Jan 29 10:14 Using Boolean Expressions not Ifs

      This morning I realised that the "george.cpp" program can be simplified because any program that has
       	if( A )
       		B=true;
       	else
       		B=false;
      (where A is a condition and B is bool) can have this code replaced by
       	B = (A);
      which is simpler but more sophisticated. Here [ george2.cpp ] is a running program that tests this idea.

      2010-01-28 Thu Jan 28 14:47 Boolean data

      In class today I showed you a program that evaluates a given Boolean expression with two variables [ george.cpp ] and I'm planning to use a version of it in Lab04 on Tuesday.

      2010-01-20 Wed Jan 20 16:32 Changes

      I have put up [ vi.intro.html ] which introduces the 'vi' editor for people working remotely.

      2010-01-19 Tue Jan 19 19:11 Program written in class today

      We wrote and tested [ gravity.cpp ] today in class. I also demonstrated our UNIX/Linux command
       		~dick/bin/Q gravity.cpp
       		~dick/bin/Q novice
      and the 'vi' technique
       		:set number
      to see the numbers on the lines of the files we write.

      Note -- the book's special data types: Time, Employee, Point, Line, Circle, and Window are all available on our lab machines and "Q" will find them for you...

      2009-03-25 Wed Mar 25 09:34 Grading done

      I finished grading the final, and unless you can find an error these will be the grades for the course.


      Table
      DistributionA/A-B+/B/B-C+/C/C-D+/D/D-F
      Frequency612503

      (Close Table)

      2009-02-05 Thu Feb 5 07:02 YouTube Objects vs Classes

      This robotic tutorial [ watch?v=IBpZBI_8QAE&NR=1 ] may help... Let me know!

      2008-02-13 Wed Feb 13 10:02 Common Errors in Projects

      I've also started grading your projects. Here are some common errors. These are nearly all examples of intelligently jumping to a completely false conclusion.
      Table
      BasisGuessCorrect
      Because everything else I do is easy This should be easy Programming takes a lot of time, care and attention to detail
      I'm in a hurry I'll skip writing an algorithm it will save time. You will get lost and confused when you don't plan.
      For loops can declare a varible "for (type name = ..." While loops can also do this They can't.
      Semicolons are at the end of statements They can't be inside a for loop: "for(...,....,...)...". They MUST be in a for loop: "for(...;...;...)..."

      (Close Table)

      2007-12-06 Thu Dec 6 18:12 Most Preliminary Grades for Winter 2006 Posted


      Table
      DistributionA/A-B+/B/B-C+/C/C-D+/D/D-F
      Frequency48314

      (Close Table)

      2007-11-29 Thu Nov 29 14:11 Syntax sheets

      I've uploaded Andrew's Syntax sheets as PDF file ready for download: [ Syntax2columns.pdf ] [ SyntaxFullSize.pdf ]

      I hope they help..... even if I feel it is always better to develop one's own cheat sheets....

      2007-11-15 Thu Nov 15 13:11 PI and Books on C++ in the library

      This is in response to a lunch time meeting with a student.

      Books on C++ can be found in the library with call number

       		QA76.73.C153


      (PI): The best way to get π, e, etc into your program is to do this

       #include <cmath>
       const double PI = 4.0*atan(1.0);
       const double E  = exp(1.0);
       const double ROOT2 = sqrt(2.0);
      These formulas automatically supply an accurate value without you having to type lots of decimal digits. By putting them outside of all the functions and classes you request that they are evaluated before the program starts running.

    . . . . . . . . . ( end of section CSE201 Introduction to Computer Science) <<Contents | End>>

    Abbreviations

  1. Algorithm::=A precise description of a series of steps to attain a goal, [ Algorithm ] (Wikipedia).
  2. Class::=A description of a type of object that includes the data it knows and the functions it can execute.
  3. Function::programming=A selfcontained and named piece of program that knows how to do something.
  4. Gnu::="Gnu's Not Unix", a long running open source project that supplies a very popular and free C++ compiler.
  5. OOP::="Object-Oriented Programming", Current paradigm for programming.
  6. Semantics::=Rules determining the meaning of correct statements in a language.
  7. SP::="Structured Programming", a previous paradigm for programming.
  8. Syntax::=The rules determining the correctness and structure of statements in a language, grammar.
  9. Q::software="A program I wrote to make software easier to develop",
  10. TBA::="To Be Announced", something I should do.
  11. TBD::="To Be Done", something you have to do.
  12. UML::="Unified Modeling Language", industry standard design and documentation diagrams.
  13. void::C++Keyword="Indicates a function that has no return value".

( End of document ) <<Contents | Top