cse 201 - Winter 2018

Professor Ernesto Gomez
http://www.cse.csusb.edu/egomez/
phone: (909) 537-5429
office: jb337
ernesto@csusb.edu

Class: T-Th 10 AM CS 122, Lab: T-Th 11:30 AM JB-359
mail lab code and assignments to: Sarjil Hasan 004867222@coyote.csusb.edu>/a>

office hours:TBA

This class will introduce you to computer science and the C++ language.

Syllabus - may change

Other references: UML

Linux.org - Information and links

Codepad - quick multilanguage interpreter

ANNOUNCEMENTS:

Sorry about Monday class - my watch and my office clock had not been updated to daylight saving. See you Wednesday

The midterm will be Wednesday Feb 7, in class. It will cover Chapters 1-3. You are allowed 1 page of notes (both sides).

There will be one final and one midterm, midterm will be in the 5th week of the term, date TBA.
The final is comprehensive, taking material from Ch. 1-6 (7?) of the book, plus one extra credit question which may be any computer science quetion that I think some of you might know or be able to figure out. See notes for final, below for my outline of material. You are allowed 2 pages of notes.

Extra credit problems, may be turned in by the end of the term:
---- P4.10 page 221; P6.8, P6.10 page 298.

When you email lab results: ---- Send actual C++ code as an attachment - do not copy into the body of the email
---- When sending code, include a screen shot showing that the code runs

Class will not meet for lecture on Tuesday, Nov 24. Watch this space for reading assignment.
There will be lab on Tuesday, Nov 24. No new lab assignment, use this time to finish old stuff.
All work should be turned in on or before Monday Dec 7, the end of the term. MIDTERM Ch 1-3, you can bring 1 page of notes
FINAL - See university finals schedule. Comprehensive, Chapters 1-6, you can bring 2 pages of notes

Labs :
All labs must be turned in on or before the last day of the term. If you want to turn in an improved version of something already turned in, add "revised lab (number)" in the subject line. Send all labs in with screenshot showing the program working.

--1-- Hello world program
--2-- Calculator version 1 (loop, if statements, arithmetic) calculator
--3-- Calculator version 2 (statement as logical predicate, break statement)
--4-- Add vector of saved values to calculator - (details coming here)
You will need:
. vector declaration: "vector <double>>reg[10];" // create 10 double precision registers
. a "put" command P# // where # is a number 0 to 9 - P# saves current value of x to reg[#]
. a "get" command G# // copies value of reg[#] into y, instead of entering from keyboard
. a "read" command R# // displays te value in reg[#]
. a "set" command S#,value // reg[#] to value (may be 2 separate inputs)
Note that # stands for a register number 0 to 9. You will need to figure out where and how to input the above commands.

v1 v2 -- (option-extra credit) Lunar lander game.Dont panic! - How to read the code.
--5-- Bubble sort notes1 notes2
--6-- Upgrade bubble sort - use 2 swap loops, reversing directions through your vector. notes1 notes2
--7-- Add trig functions: sin,cos,tan; asin,acos,atan to your calculator program. The functions want angles in radians, the inverse functions (asin,acos,atan) return radians. Convert to and from degrees as needed. You will need #include in your program to use the functions.



Remote access: work from home
Some basic debugging hints
Printing and saving graphics output 



The following are my notes on the class: they are generally an annotated outline of material covered relating to each chapter in Horstmann.

Introduction
The C++ Library, Strings, Input/Output
Objects and Classes
Blocks, Variable scope, IF and control statements
Functions
Modules - defining Objects and Classes
Loops
Debugging
Vectors 


Downloads:

You need SSH to login to your CS account from home.
SSH - official site
Open SSH - compatible freeware
SSH for Macintosh
Note that to log in, you must first connect to the gateway machine jbh3-1.csusb.edu. Once you are there, type "ssh (machine-name)", where (machine-name)is one of the computers in the lab.

Cygwin is a free Linux environment that runs under Windows. It includes the standard GNU tools and compilers.
Cygwin - Linux environment that runs under Windows

DJGPP is a version of the GNU C, C++ compilers and tools that runs in a Windows DOS box
DJGPP - GNU compilers and tools for Windows

Ghostview is a viewer for Postscript files - standard under Linux - Many computer science references on the internet are in Postscript format.
Ghostview - Poscript viewer

a bunch of old text based games in BASIC