general computer science for engineers cisc 106 lecture 01 james atlas computer and information...
TRANSCRIPT
General Computer General Computer Science Science
for Engineersfor EngineersCISC 106CISC 106
Lecture 01Lecture 01
James AtlasComputer and Information Sciences
9/2/2009
Course OverviewWebsite:
◦http://www.udel.edu/CIS/jatlas/106/09F/
Lab based course◦MATLAB◦TA for each lab
LabsPair programmingLabs assigned on MondayLabs always due on the following
Thursday at 11:55PM (10 days from assignment)
Projects are group work and will be due 3 weeks after assigned
GradingLabs (25%)Participation (5%)Two Projects (10% + 10%)Two Midterm Exams (15% + 15%)Final Exam (20%)
Your final course grade cannot be more than one letter grade higher than your exam average
Intro to Computer ScienceExercise:Compute based PictionaryYour team must create a list of
instructions to draw a picture◦ Choose a simple object to draw◦ Numbers are allowed◦ All prepositions, adjectives are allowed
on, next to, across
◦ Nouns can only be geometric nouns: Circle Line Square
◦ No “car” or object nouns
FunctionsFunctionsTop-down program design (pp.
87-90)Breaking problems downCode reuse (Don’t reinvent the
wheel)
How do we write functions in MATLAB?
Sample function circleArea.mSample function circleArea.m
%circleArea = number -> number%takes the radius of a circle and
returns the calculated area of a circlefunction outputValue =
circleArea(radius) outputValue = pi * radius ^ 2;
Now, what if we want to Now, what if we want to calculate area of a ringcalculate area of a ringA ring of two concentric circles
= -