BCEE231 Programming for Building and Civil Engineers
Assignment #1
Catherine Nguyen (7384971)
Tutorial section M MA
Professor Sangsoo Han
Due date:
10 October 2014
Summary
P1.1
a) The problem asks to show that the equation E1 will be equal to 0.5 as x app

SAMPLE EXAMINATION QUESTIONS Chapter 1
The mid-term (final exam) will have up to 8 (25) questions for 1 (3) hours. Adjacent students will have
different exams.
Special instructions: Closed book. No calculators. A non-electronic dictionary is permitted.
A)

LOCAL/GLOBAL VARIABLES (continued)
When the program has only ONE function [i.e. main()], we don't really care if all data is global.
Things change when we have many user-defined functions. To reduce the chance of errors, we
should use local variables in f

Exam
Name
MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
1) How much of Earths land surface is currently covered by glacial ice?
A) 25% B) 10% C) 45% D) <1%
2) During ice—age times when glaciers ar

Exam
Name
MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
1) Silicate igneous rocks make up the .
A) bulk of the Earth's crust and mantle
B) bulk of volcanic mountains but not much else on Earth
C)

Exam
Name
MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
1) On May 18, 1980, which Cascades volcano blew its top with the largest eruption in North America
in recorded history?
A) Mt. Shasta, CA
B)

SAMPLE EXAMINATION QUESTIONS Chapter 1
The mid-term (final exam) will have up to 8 (25) questions for 1 (3) hours. Adjacent students will have
different exams.
Special instructions: Closed book. No calculators. A non-electronic dictionary is permitted.
A)

Sample Multiple Choice Questions Chapter 5
In Part 1: Consider carefully each question, and select the best answer
In Part 2: Write the answer number and its reason or justification.
Part 1
The situation
1.
In relation to the described situation:
Consider

Sample Multiple Choice Questions Chapter 7
In Part 1: Consider carefully each question, and select the best answer
In Part 2: Write the answer number and its reason or justification.
Part 1
The situation
In relation to the described situation:
1. Consider

Sample Multiple Choice Questions Chapter 4
In Part 1: Consider carefully each question, and select the best answer
In Part 2: Write the answer number and its reason or justification.
_
Part 1
Note: Line numbers are added for reference only.
The situation:

Chapter 6
Application to Equilibrium
Problems of Rigid Bodies
Science is built with facts as a house
is with stones-but a collection of
facts is no more a science than a
heap of stones is a house.
- Jules Henry Poincar
6.1 Moment of a Force about a Point

Chapter 4
Programming with Arrays
But the fruit that can fall without
shaking,
Indeed is too mellow for me.
- Lady Mary Wortley Montagu
4.1 Array Variables: One Name for Many Storage Boxes . 2
4.2 Working with Array Elements using Loops. 6
Example 4.1 . 6

Chapter 3
Customized Power Tools:
User-Defined Functions
Each problem that I solved
became a rule which served
afterwards to solve other
problems -Ren Descartes
3.1 Introduction. 2
3.2 Functions for Task Division . 3
1. Task Division . 3
2. Data Communica

Part II: Application of Procedural Programming
Chapter 5: Application to Problems on
Statics of Particles
The purpose of computing
is insight, not numbers.
- Hamming
5.1 Resultant of Forces . 2
1. The Resultant of 2-D Forces . 2
Exercise 5.1 . 4
2. Compon

Exam
Name
MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
1) Which manufactured products contain minerals or elements extracted from mineral resources?
A) aluminum beverage cans
B) "pencil lead"
C)

BCEE231 Programming for Building and Civil Engineers
Assignment #2
Catherine Nguyen (7384971)
Tutorial section M MA
Professor Sangsoo Han
Due date:
31 October 2014
Summary
P2.1
a) The objective of this task is to write a function that computes and returns

Creation of Array Variables
A variable (both float & mat) can be global or local:
Global (visible to all functions): This is either by explicit declaration or by default (used in main() )
Local to a particular function: This must be by explicit declarat

2.3 The if/else Control Structure for Conditional Actions
if(Expr)
cfw_
. / TRUE-block
else
cfw_
. / ELSE-block (optional)
. / OTHER-statement
If the value of Expr is non-zero (i.e. TRUE), the statements in the TRUE-block will be
executed or else the st

Using compound logical expressions to plot a graph of multiple equations and values of x.
Can be written as:
plot(x,0,14,
y = (2*x/3) * (x >= 0 & x <= 3) + (-(x-3)/2+3) * (x > 3 & x
<= 7)
+ (-0.6*(x-7)^2+3.2*(x-7)-2) * (x>7 & x<=12)
+ (x-12)/2-1) * (x > 1

#$K>+
/ Division operator
The division operator '/' does not apply to vectors and matrices.
#
Divisionoperator
$
/ Division operator
K
division, operator; operators, /; division
>
Win2
+
cmap:0000
#$K>+
/. Comment operator
Two consecutive slashes '/' make

BCEE 231 Homework Set #2
P2.1 (15 marks)
Complete the following functions to accomplish the tasks specified in
the program:
Ln(float xo, float Err)
cfw_ /* Compute and return ln(xo+1) (with Estimated Error
less than Err) using the recurrence relation in A

SAMPLE EXAMINATION QUESTIONS Chapter 1
The mid-term (final exam) will have up to 8 (25) questions for 1 (3) hours. Adjacent students will have
different exams.
Special instructions: Closed book. No calculators. A non-electronic dictionary is permitted.
A)

BCEE 231 Homework Set #4
P4.1 [30 maks]
A uniform cable hanging under its own
weight takes the shape of the catenary1,
whose equation is simplest when the y-axis
is at the axis of symmetry, and the x-axis is
at the distance below the curve's vertex:
x
y =

Department of Building, Civil and Environmental Engineering
BCEE 231: STRUCTURED PROGRAMMING AND APPLICATIONS
FOR BUILDING AND CIVIL ENGINEERS 3 CREDITS
Prerequisite: MATH 204; ENGR 242 previously or concurrently
Changes to the information in the course o

BCEE 231 Homework SET #1
P1.1 (25 marks)
A metal ball is dropped from a helicopter
at the height h1 = 500 m. When it
touches the ground, its vertical velocity is
V1 = 2 gh1 where g = 9.81 m/s2. The ball
h1
h2
V2
bounces off the ground with the vertical
ve

BCEE231 Programming for Building and Civil Engineers
Assignment #4
Catherine Nguyen (7384971)
Tutorial section M MA
Professor Sangsoo Han
Due date:
21 November 2014
Summary
4.1
a) The problem asks for a function that would calculate the tensions for any6

BCEE231 Programming for Building and Civil Engineers
Assignment #3
Catherine Nguyen (7384971)
Tutorial section M MA
Professor Sangsoo Han
Due date:
7 November 2014
P3.1
Summary
a) The task here is to create a program that compute the displacement magnitud

Chapter 2
Program Design and Control Structures
A failure is a man who has blundered
but is not able to cash in on the
experience - Elbert Hubbard
2.1 Programs and Programming . 2
1. Flowchart: The Sequence of Logical Steps . 3
Review Questions 2.1 . 4
2.

Structured Programming and
Applications for Engineers
Lecture notes for
BCEE 231
by K. H. Ha, Ph. D.
Professor of Engineering
Concordia University
Copyright by K. H. Ha, 2012
K. H. Ha - BCEE 231 Chapter 1 - v3
1.i
Preface
"When I learned to program, you

Department of Building, Civil and Environmental Engineering
BCEE 231: STRUCTURED PROGRAMMING AND APPLICATIONS
FOR BUILDING AND CIVIL ENGINEERS 3 CREDITS
Prerequisite: MATH 204; ENGR 242 previously or concurrently
Changes to the information in the course o

19/09/2014
Sections 2.1-2.9: Program
Design and Control
Structures
1
2.1 Programs and Programming
Computer Programs
set of instructions or steps for the computer to perform to accomplish specified
tasks.
Computer Programming
process of organizing, plannin