Object-Oriented Programming Topic 2: Fundamental Programming Structures in Java
Data Structures and Programming. John Edgar2.
-
Upload
richard-griffin -
Category
Documents
-
view
213 -
download
1
Transcript of Data Structures and Programming. John Edgar2.
![Page 1: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/1.jpg)
CMPT 225Data Structures and Programming
![Page 2: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/2.jpg)
Course Website
http://www.cs.sfu.ca/CC/225/johnwill/
John Edgar 2
![Page 3: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/3.jpg)
John Edgar 3
Assessment
Assignments and labs – 30% Midterm exam in class – 25% Final exam – 45%
![Page 4: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/4.jpg)
John Edgar 4
CMPT 225 Topics
Data Structures Algorithms Software Development Programming
![Page 5: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/5.jpg)
John Edgar 5
CMPT 225 Topics
Data Structures and Abstract Data Types Stacks Queues Priority Queues Trees Graphs Hash Tables
Algorithms Software Development Programming
![Page 6: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/6.jpg)
John Edgar 6
CMPT 225 Topics
Data Structures Algorithms
Tools – Recursion Efficiency – O Notation Algorithms to support data structures Sorting
Software Development Programming
![Page 7: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/7.jpg)
John Edgar 7
CMPT 225 Topics
Data Structures Algorithms Software Development
Specification Design – OOP design Implementation Testing
Programming
![Page 8: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/8.jpg)
John Edgar 8
CMPT 225 Topics
Data Structures Algorithms Software Development Programming
Implementing data structures and algorithms
Understanding stack and heap memory use
Recursion Writing robust re-usable programs
![Page 9: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/9.jpg)
John Edgar 9
Objectives – Data Structures
At the end of this course you should, for each of the data structures we cover, be able to Describe the operations Explain common implementations Implement in a programming language
(C++) Compare with other data structures Recommend which data structure to use
for a given problem
![Page 10: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/10.jpg)
John Edgar 10
Objectives – Algorithms
At the end of this course you should, for each of the algorithms we cover, be able to Implement in a programming language
(C++) Analyze running time and space
requirements Compare with other algorithms of a
similar nature
![Page 11: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/11.jpg)
John Edgar 11
Objectives – Programming At the end of this course you should be able
to Write algorithms using recursion Understand the advantages of disadvantages of
using recursive algorithms Implement data structures using both arrays and
reference structures as the underlying structure Compare array and reference structure
implementations Use features of the C++ language to write well-
structured programs
![Page 12: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/12.jpg)
John Edgar 12
Objectives – O Notation
At the end of this course you should be able to Understand and describe the
mathematical basis of O notation Compute the O notation running time of
algorithms Understand the limitations of O notation
![Page 13: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/13.jpg)
John Edgar 13
Overall Objectives
Develop problem solving techniques To take a problem statement And develop a computer program to
solve the problem A solution consists of two
components Algorithms Data storage
![Page 14: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/14.jpg)
John Edgar 14
Course Focus
Problem solving Use abstraction to design solutions Design modular programs Use recursion as a problem-solving
strategy Provide tools for the management of
data Identify abstract data types (ADTs) Examine applications that use the ADTs Construct implementations of the ADTs
![Page 15: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/15.jpg)
John Edgar 15
What Makes a Good Solution?
A good solution is cost effective We should minimize the cost of the software
Running costs Resources (computing time and memory) Interaction costs (e.g. poor GUI may result in the
loss of business) Costs related to errors (e.g. loss of customer
information, storing incorrect data, etc.) Development and maintenance costs
i.e. costs related to the software life cycle
![Page 16: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/16.jpg)
John Edgar 16
Good Software Is
Well structured Modular Modifiable Written with good style
Well documented Easy to use Efficient Able to degrade gracefully (fail-safe) Debugged
![Page 17: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/17.jpg)
John Edgar 17
Software Life Cycle
Documentation
![Page 18: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/18.jpg)
John Edgar 18
Software Life Cycle Phases - 1 Specification
Understand the client’s problem and requirements Ensure that the requirements are clear and complete and
understood by all stakeholders Design
Plan the implementation of the application’s data and operations
Plan the testing Risk Analysis Verification
Ensure that algorithms are correct Ensure that the design satisfies the requirements
(validation) Implementation
![Page 19: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/19.jpg)
John Edgar 19
Software Life Cycle Phases - 2 Testing
Verify that the code works and meets the client’s requirements
There are various types of testing, unit testing, integration testing, system testing, user acceptance testing
Refining Production
Package, distribute and install application and train users Maintenance
Add features, and Fix bugs
Documentation, which includes the user manual Common to all the phases of the life cycle
![Page 20: Data Structures and Programming. John Edgar2.](https://reader036.fdocuments.in/reader036/viewer/2022072010/56649db35503460f94aa2b8e/html5/thumbnails/20.jpg)
John Edgar 20
Software Life Cycle and CMPT 225
We are primarily concerned with three phases of the life cycle Design Implementation Testing