CSE 1030: Data Structure Mark Shtern.

Slides:



Advertisements
Similar presentations
 Specifies a set of methods (i.e., method headings) that any class that implements that interface must have.  An interface is a type (but is not a class).
Advertisements

Identity and Equality Based on material by Michael Ernst, University of Washington.
Java Review Interface, Casting, Generics, Iterator.
Singleton vs utility class  at first glance, the singleton pattern does not seem to offer any advantages to using a utility class  i.e., a utility class.
Written by: Dr. JJ Shepherd
Java 1.5 & Effective Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Scott Grissom, copyright 2004Ch 3: Java Features Slide 1 Why Java? It is object-oriented provides many ready to use classes platform independent modern.
Cmp Sci 187: Midterm Review Based on Lecture Notes.
Chapter 10 Classes Continued
CSE 250: Data Structures Week 3 January 28 – February 1, 2008.
Chapter 6 Class Inheritance F Superclasses and Subclasses F Keywords: super F Overriding methods F The Object Class F Modifiers: protected, final and abstract.
COP3502 Programming Fundamentals for CIS Majors 1 Instructor: Parisa Rashidi.
COSC 1P03 Data Structures and Abstraction 4.1 Abstract Data Types The advantage of a bad memory is that one enjoys several times the same good things for.
1 Java: AP Curriculum Focus and Java Subset Alyce Brady.
1/20/03A2-1 CS494 Interfaces and Collection in Java.
15440 Distributed Systems Recitation 1 Objected-Oriented Java Programming.
Chapter 3 Inheritance and Polymorphism Goals: 1.Superclasses and subclasses 2.Inheritance Hierarchy 3.Polymorphism 4.Type Compatibility 5.Abstract Classes.
Types in programming languages1 What are types, and why do we need them?
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
1 Stacks (Continued) and Queues Array Stack Implementation Linked Stack Implementation The java.util.Stack class Queue Abstract Data Type (ADT) Queue ADT.
Introduction to Collections. Collections Collections provide a way of organizing related data in a model Different types of collections have different.
CSE 1020: Exceptions and A multiclass application Mark Shtern 1-1.
1 Queues (Continued) Queue ADT Linked queue implementation Array queue implementation Circular array queue implementation Deque Reading L&C , 9.3.
619 Final Review Last updated Fall 2011 Paul Ammann.
CSE 1020:Using Objects Mark Shtern 1-1. Summary Read API Method binding and overloading Development process Input validation Assert 1-2.
Notices Assn 2 is due tomorrow, 7pm. Moodle quiz next week – written in the lab as before. Everything up to and including today’s lecture: Big Topics are.
CSE 310 Object Oriented Programming Summer 2016 Suraiya Tairin.
Today Encapsulation. Build a fully encapsulated Halloween class, going from Halloween1 to Halloween6 (eventually!): –The final version will have overloaded.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
Week 15 – Monday.  What did we talk about last time?  Tries.
The AP Java Subset Topics. A Topics Primitive Types int double boolean.
Written by: Dr. JJ Shepherd
OOP: Encapsulation &Abstraction
Chapter 6 Queue.
Set Collection A Bag is a general collection class that implements the Collection interface. A Set is a collection that resembles a Bag with the provision.
University Of Karachi Department Of Computer Science
Jim Fawcett CSE681 – SW Modeling & Analysis Fall 2014
CSC 243 – Java Programming, Spring 2014
CS 215 Final Review Ismail abumuhfouz Fall 2014.
Inheritance and Polymorphism
Object Oriented Programming in Java
CMPE212 – Stuff… Exercises 4, 5 and 6 are all fair game now.
Computer Science II Exam 1 Review.
Object Based Programming
Java Programming Language
Polymorphism and access control
CSE 1030: Implementing Mixing static and non-static features
CSE 1030: Implementing Non-Static Features
CSE 1020:Programming by Delegation
Implementing Non-Static Features
CSE 1030: The Collection Frameworks
CSE 1020:Inheritance Mark Shtern.
Java Programming Course
619 Final Review Fall 2017 Professor Ammann.
Recall What is a Data Structure Very Fundamental Data Structures
Fall 2018 CISC124 2/24/2019 CISC124 Quiz 1 marking is complete. Quiz average was about 40/60 or 67%. TAs are still grading assn 1. Assn 2 due this Friday,
CECS 220: OOP design with java
CSC 220 – Processing Spring, 2017
1.4 ทบทวน JAVA OO Programming Concepts Declaring and Creating Objects
CIS 199 Final Review.
slides created by Alyssa Harding
CS 112 Programming 2 Lecture 02 Abstract Classes & Interfaces (2)
CMPE212 – Reminders Quiz 1 marking done. Assignment 2 due next Friday.
CSE 1030: Aggregation and Composition
CMPE212 – Reminders Assignment 2 due next Friday.
Review for Midterm 3.
Inheritance Lakshmish Ramaswamy.
CS 240 – Advanced Programming Concepts
Presentation transcript:

CSE 1030: Data Structure Mark Shtern

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

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

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

Example 01 Implement a set collection using LinkedList

Example 02 Implement a queue collection using LinkedList

Example 03 Implement a stack collection using LinkedList

Course Review

Concepts Client vs. Implementer Development cycle UML Delegation Performance

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

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

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

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

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

Interface Methods Constants Examples Serializable Cloneable Comparable

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

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

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

Recursion Loops vs Recursion Base cases Recursive cases

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