10
Introduction to CMPT 225

Introduction to CMPT 225

  • Upload
    edita

  • View
    79

  • Download
    0

Embed Size (px)

DESCRIPTION

Introduction to CMPT 225. What’s on the menu?. • Grading. • Who’s who. • Course content. • The story of life. Introduction to CMPT 225. Grading. - PowerPoint PPT Presentation

Citation preview

Page 1: Introduction to CMPT 225

Introduction to CMPT 225

Page 2: Introduction to CMPT 225

Introduction to CMPT 225

What’s on the menu?

• Grading

• Course content

• Who’s who

• The story of life

Page 3: Introduction to CMPT 225

Introduction to CMPT 225

Midterm: 25%

Final: 40%

Quizzes: 4%

Assignments: 23%

Labs: 12%

You must attain an overall passing grade on these to obtain a clear pass: a grade of C or better.

5 assignments, 6 labs

Quizzes are bonus to assignments/labs

Academic Honesty plays a key role in our efforts to maintain a high standard of academic excellence and integrity. Students are advised that ALL acts of intellectual dishonesty are subject to disciplinary action by the School; serious infractions are dealt with in accordance with the Code of Academic Honesty (T10.02)

Grading

Page 4: Introduction to CMPT 225

Course ContentFor a given problem, you will be able to:

• Construct an abstract solution (modular design)

• Select an appropriate data structure (Lists, Stacks, Trees…)

• Use these structures in an efficient way (algorithm design)

• Implement the solution in Java (programming techniques)

Introduction to CMPT 225

Messy description of problem from customers

Solution with several components

Each component will manipulate data.

This data is stored in the computer in a certain way.

Page 5: Introduction to CMPT 225

An example of what this is all about

Introduction to CMPT 225

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?

Page 6: Introduction to CMPT 225

An example of what this is all about

Introduction to CMPT 225

What data structures do we have?

In a linked list:

• When a new student comes, he simply connects to the previous

• 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.

Adding a student is immediate (doesn’t depend on n) : O(1).

Page 7: Introduction to CMPT 225

An example of what this is all about

Introduction to CMPT 225

What data structures do we have?

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.

6

83

5 9

Adding takes longer than in the list, but what about searching?

Page 8: Introduction to CMPT 225

An example of what this is all about

Introduction to CMPT 225

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.

Page 9: Introduction to CMPT 225

This course and other ones at SFU

Introduction to CMPT 225

If we describe a simple task, you can program it.

CMPT 101, 104, 125, 126 or 128; or CMPT 128.

CMPT 225.Start finding out the components of a program.

Program efficiently.

CMPT 307. CMPT 275. CMPT 383.

Page 10: Introduction to CMPT 225

The story of life

Introduction to CMPT 225

Step 1: Figure out what your customer wants you to do.

Specification

Step 2: Find the components of the problem and abstract it.

Design

Step 3: That’s a business, you pay people, time costs money.

Risk Analysis

Step 4: Theoretical tools can ensure that your design works before you actually implement it.

Verification

Step 5: At some point, you actually have to write something…

Testing

Step 6: …and it’s better if it’s written correctly.

Refining

Step 7: If you have more time, you can always improve things.

Distribute

Step 8: Eventually, you may want people to use your software.

Documentation.

Coding