Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 1030: Data Structure Mark Shtern.

Similar presentations


Presentation on theme: "CSE 1030: Data Structure Mark Shtern."— Presentation transcript:

1 CSE 1030: Data Structure Mark Shtern

2 Written Test Different exam (>9) Wrong Exam Strategy (> 10) Q1
No auto generate id (>13) Static is missing (>12) No super (>6) No extend (>7) Public/Private

3 Written Test Q2 Alias Deep and Shallow copy (> 20%) (Book: pages 313, 822) Q3 Wrong signature (>12) (idea on page 663) Q4

4 Data Structure Stack is a last in, first out
Push, pop Queue (FIFO) is collection in which the entities in the collection are kept in order enqueue: addition of entities to the rear terminal position dequeue removal of entities from the front terminal position Set FIFO is acronyms for First In, First Out

5 Example 01 Implement a set collection using LinkedList

6 Example 02 Implement a queue collection using LinkedList

7 Example 03 Implement a stack collection using LinkedList

8 Course Review

9 Concepts Client vs. Implementer Development cycle UML Delegation
Performance

10 Classes Methods Attributes Constructor Public/Private Class vs Object
Copy constructor, constructor chaining, super Public/Private Class vs Object Interclass Abstract class Generics Javadoc Archietcture

11 Object State Reference Accessors and Mutators Immutable
equals/ hashCode, compareTo and toString Clone vs copy constructor Object vs utility this Inheritance

12 Methods Parameters Return Precondition/Postcondition Exceptions
Reuse code, code duplication Initialize Parameters Attribute shadowing vs overload vs override Early and late binding Static Final

13 Attribute Primitive type Non primitive type Static Final
Attribute Privacy Attribute caching

14 Patterns Invocation counter Stamping a serial number Singleton
Model-View-Controller

15 Interface Methods Constants Examples Serializable Cloneable Comparable

16 Aggregation and Composition
Copy Alias, shallow, Deep Collections Obligatory methods

17 Storage Collections Data Structure Arrays Traversal Map, Set, List
Stack, Queue, LinkedList Arrays Traversal Index, iterators

18 Validation Exceptions Error codes Friendly/Message Error handling
Checked, unchecked try, catch, throw, handling multiple exceptions Error codes Friendly/Message Error handling Assertion Defensive programming

19 Recursion Loops vs Recursion Base cases Recursive cases

20 Steps to Class Implementation
Write skeleton contains fields and methods required by API Write test harness that tests every feature of the class Identify private attribute and declare them Implement constructors, accessors, mutators, methods Avoid redundancy by delegating and defining private methods Add new test cases as you implement methods


Download ppt "CSE 1030: Data Structure Mark Shtern."

Similar presentations


Ads by Google