San Jose State University : Site Name

Navigation

Main Content

Working in Mars Mission Control, JPL

Ronald Mak

Department of Computer Engineering
Spring Semester 2018

Office hours: TuTh: 3:00-4:00 PM
Office location: ENG 250
E-mail: ron.mak@sjsu.edu
Mission Control, Jet Propulsion Laboratory (JPL)
NASA Mars Exploration Rover Mission

CMPE/SE 180A: Data Structures and Algorithms in C++



Instructional Student Assistants
Weekly Tutoring Schedule


Amit Chougule
Monday 1:00-3:00 PM, room ENG 405
Zachary Zhong
Tuesday 3:00-5:00 PM, room ENG 405
Venkat Raja Iyer
Wednesday 2:00-4:00 PM, room ENG 405

Section 1: Th 6:00 - 8:45 PM, room ENG 189


Assignments


# Assigned Due Assignment
1 Jan 25 Feb 1 Pi Formulas

Sample solution: PiFormulas.cpp
2 Feb 1 Feb 8 The Monty Hall Problem

Sample solution: MontyHall.cpp
3 Feb 9 Feb 15 Hilbert Matrices

Sample solution: Hilbert.cpp
4 Feb 16 Feb 22 Big Pi

Sample solution: BigPi.cpp
5 Feb 23 Mar 1 Roman Numerals

Input file: RomanNumeral.txt

Lectures


Date Content
Jan 25 Slides: Course objectives; software to install; assignments; quizzes; exams; grading; what is C++; Hello World program; Pods and Peas program; identifier, variables, and keywords; assignment statements; input and output; #include and using namespace; formatting numbers; cin input; basic data types; string type; type compatibilities and conversions; arithmetic; operator shorthand; if statement; while loops; named constants; Boolean operators; precedence rules; enumeration types; nested if statements; switch statement; increment and decrement operators; for loops; break statement

Savitch slides: 01 02 03
Example programs: helloworld.cpp   Savitch_01-08.cpp   Savitch_03-06.cpp   Savitch_03-14.cpp
Feb 1 Slides: Predefined functions; random numbers; type casting; programmer-defined functions: declarations, definitions, calls; void functions; top-down design; number translator example; scope and local variables; block scope; global constants and variables; overloading function names; call-by-value; call-by-reference; procedural abstraction; testing and debugging functions; assert macro; Assignment #2

Savitch slides: 04 05
Top-down design example:
int2words_1.cpp   int2words_2.cpp   int2words_3.cpp   int2words_4.cpp   int2words_5.cpp
Pass-by-value example: swap.cpp
Pass-by-reference example: exchange.cpp
Feb 8 Slides: Assignment #2 sample solution; streams; file I/O; stream name vs. file name; formatting output; output manipulators; passing streams to functions; character I/O; predefined character functions; eof function; arrays; array initialization; array function parameters; multidimensional arrays; C strings; the standard string class; vectors; Assignment #3. Hilbert matrix

Savitch slides: 06 07 08
Feb 15 Slides: Assignment #2 sample solution; Assignment #3 sample solution; pointers; int vs. pointer to int; declaring and assigning pointers; pointers are addresses; address-of and dereferencing operators; new and delete operators; pointer parameters; typedef; using pointers to pass-by-reference; pointers and arrays; pointer arithmetic; dynamic arrays; char* and char**; timing execution; Assignment #4 Big Pi

Savitch slides: 09
Dynamic array example: DynamicArray.cpp
Elapsed time example: TimeVector.cpp
Feb 22 Slides: Assignment #4 sample solution; structures; structures are types; scope of member names; structure variables; object-oriented programming (OOP); classes; member functions; public and private members; constructors; abstract data types (ADT); friend functions; operator overloading; overload <<; overload >>; Assignment #5 Roman Numerals

Savitch slides: 10
Example class Birthday v1: Birthday1.cpp
Example class Birthday v2: Birthday2.cpp


Goals


CMPE 180A is an introduction to data structures and algorithm design with C++. The course emphasizes important data structures, such as linked lists, stacks, queues, hash tables, trees, and graphs. It also introduces recursive algorithm design and algorithm analysis techniques. Learning to program well in a language like C++ requires much practice! You should expect to write one or more programs each week. The programming assignments will become increasing more challenging during the semester.


Prerequisites


Department policy is to enforce
all course prerequisites strictly

Admission into the CMPE or SE masters program.


Required books


Problem Solving with C++, 9th edition
Walter Savitch
Pearson, 2015
ISBN: 978-0133591743
Data Structures Using C++, 2nd edition
D.S. Malik
Cengage Learning, 2010
ISBN: 978-0324782011


Software to install


GNU C++ is usually pre-installed on the Mac and Linux platforms. For those platforms, install one of the following integrated development environments (IDE) for C++ development:

Do not use Apple's Xcode on the Mac, or you run the risk of writing programs that will not port to other platforms.

On Windows, do run use Microsoft Visual C++, or you run the risk of writing programs that will not port to other platforms. Windows users should install VirtualBox and run Linux as a virtual machine. Debian is a good Linux distribution. Download a .iso installation image and install it VirtualBox. Run Debian on the virtual machine and use its pre-installed GNU C++ compiler. Then you can install Eclipse or NetBeans for Linux.