1 / 3

What kind of data do I have?

What kind of data do I have?. Doesn’t matter now, but fast search later. Goal: Build a new web browser with visited URLs highlighted. What performance do I need?. a Set. Customize the specific data structure that implements the interface here (can easily change later).

conley
Download Presentation

What kind of data do I have?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. What kind of data do I have? Doesn’t matter now, but fast search later Goal: Build a new web browser with visited URLs highlighted What performance do I need? a Set Customize the specific data structure that implements the interface here (can easily change later) Write code against the interface class URLSet { ISettheURLs; URLSet(ISetemptyURLs) { this.thisURLs = emptyURLs; } booleanformatURL(String url) { if (this.theURLs.hasElt(url)) { <underline text, color purple> } else { <color blue> } } } class Browser { URLSetvisitedURLs; Browser () { this.visitedURLs = new List(); } … } MtBST() Where did the List class and ISet interface come from?

  2. Fundamental Abstract Datatypes in Computer Science: • Set • Bag • Stack • Queue • Priority Queue • … • Each one has: • operations • properties • axioms • (see class notes for example) creates an interface for each ADT Different data structures provide different performance guarantees for different datatypes • Fundamental Data Structures: • Struct • List • Binary Tree • N-ary Tree • Binary Search Tree • AVL Tree • Heap • Hashtable • … The Master (Java) programmer often provides classes that implement data structures against various interfaces

  3. CS2102 is trying to teach you aspects of both of the developer and master roles! • what are the core ADTs and Data Structures of CS? • how to capture ADTs in Java (interfaces) • how to implement data structures in Java (using classes) • how to select among data structures for particular problems • how to write code that enables switching between data structures as needed • how to test implementations of data structures or applications that use data structures with different properties If you want to major/minor in CS or IMGD-Tech, you need the basic skills of the master If you just want some programming experience, learning to implement data structures helps build solid, widely applicable software design skills

More Related