Computer Science 210: Data Structures

Similar documents
CS Computer Science I

Data Structures and Algorithms

CSCI 136 Data Structures & Advanced Programming. Fall 2018 Instructors Bill Lenhart & Bill Jannen

CS 241 Data Organization. August 21, 2018

Course: Honors AP Computer Science Instructor: Mr. Jason A. Townsend

CS 241 Data Organization using C

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims

CISC 3130 Data Structures Spring 2018

Credit: The lecture slides are created based on previous lecture slides by Dan Zingaro.

CSCI 136 Data Structures & Advanced Programming. Spring 2018 Instructors Bill Jannen & Jon Park

ECE573 Introduction to Compilers & Translators

CISC 3130 Data Structures Fall 2018

Syllabus COSC-051-x - Computer Science I Fall Office Hours: Daily hours will be entered on Course calendar (or by appointment)

Announcements. 1. Forms to return today after class:

About this exam review

CS2013 Course Syllabus Spring 2018 Lecture: Mon/Wed 2:00 P.M. 2:50 P.M. SH C259 Lab: Mon/Wed 2:50 P.M. 4:00 P.M. SH C259

Computer Science II Data Structures

Sprint 2017, Sul Ross State University

CSC 172 Data Structures and Algorithms. Fall 2017 TuTh 3:25 pm 4:40 pm Aug 30- Dec 22 Hoyt Auditorium

COMP 2150 CS 2: Object-Oriented Programming and Data Structure Fall 2018 Dr. James Yu

You must pass the final exam to pass the course.

3D Graphics Programming Mira Costa High School - Class Syllabus,

Introduction to Programming System Design CSCI 455x (4 Units)

Lesson 10A OOP Fundamentals. By John B. Owen All rights reserved 2011, revised 2014

Lecture 1: Overview & Intro to Java

CSE 114, Computer Science 1 Course Information. Spring 2017 Stony Brook University Instructor: Dr. Paul Fodor

CS 231 Data Structures and Algorithms, Fall 2016

Outline. Computer Science 331. Course Information. Assessment. Contact Information Assessment. Introduction to CPSC 331

Fundamentals of Computer Science CSCI 136 Syllabus Fall 2018

Java Primer 1: Types, Classes and Operators

Introduction to Data Structures

McGill University School of Computer Science COMP-202A Introduction to Computing 1

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit.

Tips from the experts: How to waste a lot of time on this assignment

Lecture 3. COMP1006/1406 (the Java course) Summer M. Jason Hinek Carleton University

CS1 Lecture 2 Jan. 16, 2019

Lecture Transcript While and Do While Statements in C++

CSCI 4250/6250 Fall 2013 Computer and Network Security. Instructor: Prof. Roberto Perdisci

CS503 Advanced Programming I CS305 Computer Algorithms I

Compilers. Computer Science 431

COLLEGE OF DUPAGE CIS 2542 Advanced C++ with Data Structure Applications Course Syllabus

CPSC 2380 Data Structures and Algorithms

San José State University Department of Computer Science CS151, Section 04 Object Oriented Design Spring 2018

ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives:

CS 200, Section 1, Programming I, Fall 2017 College of Arts & Sciences Syllabus

CSE 113 A. Announcements - Lab

COMP251: Algorithms and Data Structures. Jérôme Waldispühl School of Computer Science McGill University

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018

Physics 2660: Fundamentals of Scientific Computing. Lecture 3 Instructor: Prof. Chris Neu

CprE 288 Introduction to Embedded Systems Exam 1 Review. 1

Comp 11 Lectures. Mike Shah. June 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures June 26, / 57

San José State University College of Science/Department of Computer Science CS 152, Programming Language Paradigms, Section 03/04, Fall, 2018

CS2013 Course Syllabus Spring 2017 Lecture: Friday 8:00 A.M. 9:40 A.M. Lab: Friday 9:40 A.M. 12:00 Noon

Syllabus. ICS103: Computer Programming in C 2017 / 2018 First Semester (Term 171) INSTRUCTOR Office Phone Address Office Hours

If Statements, For Loops, Functions

This course supports the assessment for Scripting and Programming Applications. The course covers 4 competencies and represents 4 competency units.

Announcements. Course Staff. Course Staff. Lectures 10/19/11. CS/ENGRD 2110 Fall Instructor. Administrative Assistant

Introduction to Programming Using Java (98-388)

Introduction to Information Technology ITP 101x (4 Units)

CS 3030 Scripting Languages Syllabus

(I m not printing out these notes! Take your own.)

EECS168 Exam 3 Review

Spring 2018 El Camino College E. Ambrosio. Course Syllabus

Programming Languages and Techniques (CIS120)

COP 3330 Final Exam Review

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA

Lab 6: P.S. it s a stack Due 11:59 pm Monday, Mar 31, 2008

CoSci 440 SYLLABUS Programming in C++ INSTRUCTOR Mari Rettke cell SECTION : and 13345

Welcome to... CS113: Introduction to C

C Pointers 2013 Author Riko H i

CS457/557 Functional Languages

CSCI-1200 Data Structures Fall 2009 Lecture 25 Concurrency & Asynchronous Computing

COMP Data Structures

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department

X

Lab 4: Super Sudoku Solver CSCI 2101 Fall 2017

Survey of Programming Languages Dr. R. M. Siegfried 407 Science (516) (not for homework submission)

CS535: Interactive Computer Graphics

CS 240 Fall Mike Lam, Professor. Just-for-fun survey:

COMP Data Structures

CS 142 Style Guide Grading and Details

Syllabus of ENPM 691: Secure Programming in C

CSC 1052 Algorithms & Data Structures II: Introduction

Who we are: Lecture 1: Overview & Java. Why CS 62? Sample Problems. CS 62 Fall 2016 Kim Bruce & Peter Mawhorter

CS120 Computer Science I. Instructor: Jia Song

WELCOME! (download slides and.py files and follow along!) LECTURE 1

Lecture 1: Overview

Tips from the experts: How to waste a lot of time on this assignment

KOMAR UNIVERSITY OF SCIENCE AND TECHNOLOGY (KUST)

EECE.2160: ECE Application Programming Spring 2017

EECE.2160: ECE Application Programming Spring 2019

CS 4349 Lecture August 21st, 2017

Data Structures. Subodh Kumar. Dept of Computer Sc. & Engg. IIT Delhi. Bharti 422)

CS/ENGRD 2110 FALL 2018

ECE Object-Oriented Programming using C++ and Java

1.00/1.001 Tutorial 1

CMPT 126: Introduction to Computing Science and Programming Fall 2007, Harbour Centre

c) And last but not least, there are javadoc comments. See Weiss.

MPATE-GE 2618: C Programming for Music Technology. Syllabus

Lecture 2: Variables & Assignments

Transcription:

Computer Science 210: Data Structures

Welcome to Data Structures! Data structures are fundamental building blocks of algorithms and programs Csci 210 is a study of data structures design efficiency implementation use Prerequisites: csci 101 (at Bowdoin or in high-school) In other words beginner knowledge of programming (in Java) enjoy programming and problem solving have a desire to learn more of it

Logistics Instructor: Laura Toma office: Searles 219 Office hours: T, W, Th 4-5pm by appointment quick questions any time I am in the office TA: Kristopher Koch office hours: TBA Textbook: Goodrich & Tamassia online: Sedgewick & Wayne, Programming in Java Website: http://www.bowdoin.edu/~ltoma/teaching/cs210/fall08/ class not maintained on Blackboard

Course outline Week 1: Java review. Week 2: Object-oriented design. Week 3: Program analysis tools. Week 4: Arrays and linked lists. -------- Exam 1 Week 5: Recursion Week 6: Stacks and queues. Pong Breakout Sudoku Week 7: Searching and backtracking. Breadth- and depth-first search. Week 8: Lists (Vectors and array lists). Week 9: Maps and hash tables. Week 10, 11: Trees and search trees. Week 12: Priority queues. Boggle Tetris Week 13: Sorting. Time remaining: Graphs. -------- Exam 2 Terrains...

Work and grading policy Class work: weekly lab assignments (approx. 50%) 2 exams readings, class participation, in-class assignments The class is programming-intensive Lab assignments are not meant to be finished during lab time. You have one week to complete them. Handing in: hard copy + email on hard copy sign that you have followed class honor code Lab work: individual Late policy: 25% per day Why? it is absolutely essential that you do not fall behind failure to turn in a lab ==> fail the class better turn in incomplete lab

Honor code Students are expected to follow the Bowdoin Computer Use Policy and the Academic Honor Code. You are encouraged to discuss ideas and techniques broadly with other class members, but not specifics of assigned problems except as part of group projects. Discussions should be limited to questions that can be asked and answered without using any written medium (e.g. pencil and paper or email). This means that at no time should a student read any code written by another student unless they are part of the same group. Sharing of code or intermediate designs is expressly prohibited. The same rules apply once you have finished the course: sharing your code with other students will be considered a violation of Bowdoin's honor code. Violation of this policy is grounds for me to initiate an action that would be filed with the Dean's office and would come before the J Board. If you have any questions about this policy, PLEASE do not hesitate to contact me. This will be a zero-tolerance policy. Don t leave lab for the last night! Just submit what you have, even if not working.

More about the class.. The class is about designing, analyzing, implementing and using fundamental data structures. 101 you learnt how to use the basic constructs in Java. Put it differently, you learnt how to use a hammer and saw. focus was on learning the tools available when writing a program syntax, conditionals, loops, arrays, etc 210 Knowing how to use a hammer and saw does not mean you can build a house. In 210 you ll learn how to build a house. you ll learn more tools, and most importantly you ll learn to put them together to create a large program and...you ll learn to LEARN

More about the class It is programming intensive however... is NOT about programming but about program development design + analysis + programming + debugging Programming language: Java. Why? makes graphics and web applications easy available on all platforms new language, in fashion Most of the class will be independent of Java maybe next semester...python? You ll learn to distinguish between Java questions (check the Java doc pages to answer), and language-independent questions Java graphics NOT the core of the class Java graphics will be used to improve the interface of your programs Usually the graphical part will be given, you ll need to write the core

Labs Attendance is mandatory The labs will give a problem and ask you to solve it The labs are not meant to be finished during lab time Labs due one week after they are assigned they are your homework Labs are not all equal in general, progressively harder at the beginning: lots of info guiding you towards the solution The labs are not always connected to the topic studied in class that week the focus is on solving a problem The labs are often harder than they look. You ll spend a lot of time understanding what the task is. It is a good idea to read the lab beforehand, so that you can ask many questions during lab time. Labs are challenging and fun. They are the most important learning tool you will learn in class you will REALLY learn while working out the labs At times the process will seem painful, and occasionally you will find a lab unfair. However, at the end of the class you ll find that you ve learned a lot.

Expectations TOGETHER During class time we ll talk about data structures concepts, we ll analyze various options and we ll work out the implementation details for some of these options Often during class-time we ll program together as a group Occasionally there ll be in-class assignments and team work YOU you ll learn to think like a computer scientist you ll learn to find out what it takes to get a task accomplished you ll start your lab in a timely manner The bulk of your effort will be to get the lab assignments to work You need to develop your code so that it can be debugged!! flowchart, develop incrementally, debug, test

Scenario You develop all classes at once. Nothing works! HELP!!! if code has too many errors, their combinations are infinite ==> impossible to debug MORAL: you structure your code so that you implement one feature at a time, you debug and test it, and then go on. You get stuck in Java graphics (GUI) before solving the actual problem. Why don t the buttons show? Moral: Solve the core of the problem first, with a simple interface! If you have time at the end you can make your GUI more fancy.

More Expectations Problem: various backgrounds 101 A vs. 101B 101 vs. highschool highschool 1 vs. highschool 2 Willingness to work in a group environment Patience with material that is not new and when class is slow participate share with others Ask plenty of questions when something is unclear Goal: we want to work as a class

Class Outcomes You will learn the fundamental data structures: lists, vectors stacks, queues, priority queues, trees, hash tables and maps Design: you will learn to model and come up with a solution to a problem modularity, data abstraction, building blocks Analysis: you will learn to analyze the efficiency of your solution you will learn to use efficiency considerations to decide the choice of data structures Program development: you will learn the importance of each step in getting a program to work: design, debug, test Practice of programming: Simplicity clarity generality You ll learn to think like a computer scientist. You ll learn to find out what it takes to get a task accomplished

This being said... Yes, 210 will be challenging But, most of the people who take 210 like it say it is one of the most fun classes they took continue with Computer Science 210 is the pre-requisite for all other classes If you like 210, you should think about majoring or minoring in computer science You are all here because you liked 101 and programming Welcome, and hope you ll stay!

Java programming review GT chapter 1

Base types boolean, char, byte, short, int, long, float, double Class a type; a cookie cutter; blueprint from which individual objects are created A class does not actually exist; it is just a pattern A class contains data and methods Object an instance of a class; the actual cookie instance variables creating an object Methods Declaring methods; parameters, return types Constructor methods; main method Expressions operators, the dot operator, casting Statements: if, switch, loops, return, break, continue Arrays

Base types boolean char byte true or false 16 bit character 8-bit signed integer short int long float 16-bit signed integer 32-bit signed integer 64-bit signed integer 32-bit floating point number double 64-bit floating point number

Declaring variables <type> <varriable-name>; constants static final int MONDAY = 0; classes :[abstract public final] class <class-name> extends <super-classname> implements <interface_1> <interface_2>... { //instance variables //methods } abstract class: class has (some) abstract methods (later) final class: can have no subclasses public class: class can be instantiated and extended by by anything in the same package or by anything that imports the class

Declaring objects //class definition class Gnome {...}; //declares an object g of type Gnome Gnome g; //object g does not yet exist; to create an object call new g = new Gnome(...); constructor: a special method that is used to create objects the constructor allocates memory to hold the object and returns a reference to this memory ; this address is then stored in the object variable (g) Number objects we sometimes want to store integers ar objects x = new Integer(10); an object that represents integer 10

Instance variables represent the data associated with the object scope public: anyone can access public instance variables private: only methods of the same class (not subclass) can access private vars protected only methods of teh same package and subclasses can access protected vars static a static variable is associated with the class used to store global information about the class final a constant must have an initial value, which cannot be changed

Methods chunks of code that can be called on a particular object declaring methods parameters method modofires: public, protected, private. abstract, final, static return values and types constructor methods a special kind of method that is used to initialize newly created objects main method needed in classes that are meant to define stand-alone programs java Gnome Java-system invokes the main method in class Gnome main must be public and static

Operators assignment a = b; dot obj.methodname(...) arithmetic +, -, *, /, % ++, -- logical operators <, <=, >, >=, ==,!= operateon booleans:!, &&, bitwise operators

casting if statements break continue switch for loops for (intialization; condition; increment) body while loops Output System.out.print Input

Writing a java program design coding readability and syle testing and debugging For next time: read GT: Chapter 1