CSCI 235 Software Design & Analysis II
Lecture Notes 10 Trees
Agenda
Tree Concept & Terminology
Binary Tree
Binary Search Tree (BST)
N-ary Tree
Tree Concept & Terminology
Concept
Node with edges
Som
CSCI 235 Software Design & Analysis II (Fall, 2011)
Final Exam
Name:
This exam has 7 questions on 10 pages (including blank pages for you work). There are a total of 110
points. 100 points is a perfec
Strings: Review and Practice
/ Display the acronym for a string Best Friends Forever BFF.
/ Assume no leading or trailing spaces; words are separated
/
by exactly one space.
aThought becomes laugh ou
Programming Assignment 1
CSCI 235 section 6
Instructor Silvano Bernabel
Due Tuesday September 13 (midnight)
Follow the instructions presented in the Programming Rules document. Submit the header and s
Casting
11 / 5
2
11 / 5.0
2.2
int x = 5;
11 / x
2
Casting is a temporary effect, it lasts
only during evaluation. The original data
type of a literal or an object REMAINS
after the casting (and evalua
Every block executes in its own memory spa
RAM
cfw_
Dog
int dog = 7 ;
cout < dog ;
7
PASS by REFERENCE / PASS by VALUE
RAM
cfw_
Dog
int dog = 7 ;
cout < dog ;
7
Review: C+ tells the operating system
Cristopher Jimenez
2/16/16
Problem 1
We can express the sum of the first n positive odd numbers as
1 + 3 + 5 + . . . + (2n-1)
Or we can express it as
n
SUM (2i-1)
i=1
The product of the first n positi
REVIEW: Assume there I have a file on disk named Sect51.dat which contains integer
grades of all of my students.
Sect51.dat
66 78 89
100 49 85 75
85
50 98
Write a program that will create two new file
int x ;
cin > x ;
RAM
Objects
17
cin
17
17
cin and cout are stream objects that take up a
chunk of memory in ram, just like int and
double objects.
Its useful to think of stream objects as funnels
tha
CSCI 235 Software Design & Analysis II
Lecture Notes 03 Lists
Agenda
List Motivating Example & Design Exercise
List ADT
C+ Templates
List Motivating Example & Design Exercise
Design a class to keep tr
CSCI 235 Software Design & Analysis II
Lecture Notes 06 Recursion as a Problem-Solving Technique (equivalent to Ch. 5)
Agenda
Palindromes
8-Queens Problem
Recursion vs. Mathematical Induction
Grammars
Programming Rules/CSCI 235
Read this so that you will not be surprised later. The programming component of this course is worth
40% of your grade. I am willing to point you in the right direction by a