Introduction to CMPT 225

advertisement
Introduction to CMPT 225
What’s on the menu?
• Grading
• Who’s who
• Course content
• The story of life
Introduction to CMPT 225
Grading
Academic
Honesty playsMidterm:
a key role
You must attain an
25%
inoverall
our efforts
maintain a high
passingto
grade
standard
ofobtain
academic
excellence and
on these to
a
clear pass:Students
a grade ofare advised that
integrity.
Final: 40%
C or better.
ALL
acts of intellectual dishonesty
are subject to disciplinary action
by the School; serious infractions are
dealt
with in accordance
with the 23%
Assignments:
5 assignments,
6 labs
Code of Academic Honesty (T10.02)
Quizzes are bonus to
assignments/labs
Labs: 12%
Quizzes: 4%
Introduction to CMPT 225
Course Content
For a given problem, you will be able to:
• Construct an abstract solution (modular design)
• Select an appropriate data structure (Lists, Stacks, Trees…)
Each component will
manipulate
data. in an efficient way (algorithm design)
• Use
these structures
• Implement the solution in Java (programming techniques)
Solution with
several components
This data is stored in the
computer in a certain way.
Messy description of
problem from customers
Introduction to CMPT 225
An example of what this is all about
Our customer: SFU’s administration.
What they want: keeping track of students.
First step of design: what are the components we are dealing with?
A student component, and a set of students.
Second step of design: what are main operations on students?
The administration will search for students and add students.
What data structures do we have?
Introduction to CMPT 225
An example of what this is all about
In a linked list:
• When a new student comes, he simply connects to the previous
Adding a student is immediate (doesn’t depend on n) : O(1).
• To find a student, we go through the list ‘til the end or ‘til we find.
If there are n students, that can take at most O(n) time steps.
What data structures do we have?
Introduction to CMPT 225
An example of what this is all about
In a binary tree:
• When a new student A comes, it takes the right hand of a student B
ID(B) > ID(A) and the left hand otherwise.
Adding takes longer than
in the list, but what about
searching?
6
8
3
5
9
What data structures do we have?
Introduction to CMPT 225
An example of what this is all about
If you now learn that SFU’s administration
searches students 80% of the time and insert
new students 20% of the time, which data
structure would you recommand?
A binary tree. Intuition : insertion is slower than in a
linked list, but searching is faster.
Introduction to CMPT 225
This course and other ones at SFU
If we describe a simple task,
you can program it.
CMPT 101, 104, 125, 126
or 128; or CMPT 128.
Start finding out the
components of a program.
Program efficiently.
CMPT 307.
CMPT 225.
CMPT 275.
Introduction to CMPT 225
CMPT 383.
The story of life
Specification
Design
Risk Analysis
Step 3:
Step
1: That’s
2:
Figure
Find
the
aout
business,
components
what your
youof
customer
pay
thepeople,
problem
wants
time
and
you
costs
abstract
to do.
money.
it.
Documentation.
Distribute
Verification
Step 4: Theoretical tools can ensure that your design works
Refining
Testing
Coding
before you actually implement it.
Step 5: At some point, you actually have to write something…
Step 8:
7: Eventually,
If you have you
moremay
time,
want
youpeople
can always
to useimprove
your software.
things.
Step 6: …and it’s better if it’s written correctly.
Introduction to CMPT 225
Download