Introduction to Data Structures

Similar documents
Announcements. 1. Forms to return today after class:

BOSTON UNIVERSITY Metropolitan College MET CS342 Data Structures with Java Dr. V.Shtern (Fall 2011) Course Syllabus

You must pass the final exam to pass the course.

CISC 3130 Data Structures Fall 2018

KOMAR UNIVERSITY OF SCIENCE AND TECHNOLOGY (KUST)

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

San José State University Computer Science Department CS49J, Section 3, Programming in Java, Fall 2015

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

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

CSC116: Introduction to Computing - Java

CISC 3130 Data Structures Spring 2018

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

Welcome to CompSci 201

CS 241 Data Organization. August 21, 2018

Oklahoma State University Institute of Technology Face-to-Face Common Syllabus Fall 2017

CSC116: Introduction to Computing - Java

CS 241 Data Organization using C

CS 3030 Scripting Languages Syllabus

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

CMSC 132: Object-Oriented Programming II. Administrivia

Rochester Institute of Technology Golisano College of Computing and Information Sciences Department of Information Sciences and Technologies

CSC116: Introduction to Computing - Java

CSC 111 Introduction to Computer Science (Section C)

In this course, you need to use Pearson etext. Go to "Pearson etext and Video Notes".

CS 0449 Intro to Systems Software Fall Term: 2181

CSE 142. Lecture 1 Course Introduction; Basic Java. Portions Copyright 2008 by Pearson Education

Announcements. Course syllabus Tutorial/lab signup form (due 4pm today) Lecture 1 notes Homework 1 Initial assessment

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

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

CSC 1052 Algorithms & Data Structures II: Introduction

Object-Oriented Programming for Managers

INF 315E Introduction to Databases School of Information Fall 2015

CS503 Advanced Programming I CS305 Computer Algorithms I

EECE.2160: ECE Application Programming Spring 2017

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

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

Compilers for Modern Architectures Course Syllabus, Spring 2015

EECE 321: Computer Organization

In this course, you need to use Pearson etext. Go to "Pearson etext and Video Notes".

CSCI 201L Syllabus Principles of Software Development Spring 2018

CS/SE 153 Concepts of Compiler Design

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

CS 210 Algorithms and Data Structures College of Information Technology and Engineering Weisberg Division of Engineering and Computer Science

EECE.2160: ECE Application Programming Spring 2019

Database Security MET CS 674 On-Campus/Blended

Fundamentals of Computer Science CSCI 136 Syllabus Fall 2018

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1, 2, and 3, Spring 2018

Advanced Programming Concepts. CIS 15 : Spring 2007

Central Washington University Department of Computer Science Course Syllabus

Computer Science II Data Structures

Big Sandy Community and Technical College. Course Syllabus

Course and Contact Information. Course Description. Course Objectives

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

CSc 2310 Principles of Programming (Java) Jyoti Islam

CS 3030 Scripting Languages Syllabus

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

The Linux Command Line: A Complete Introduction, 1 st ed., by William E. Shotts, Jr., No Starch Press, 2012.

CS120 Computer Science I. Instructor: Jia Song

Course Syllabus - CNT 4703 Design and Implementation of Computer Communication Networks Fall 2011

CS/SE 153 Concepts of Compiler Design

61A LECTURE 1 FUNCTIONS, VALUES. Steven Tang and Eric Tzeng June 24, 2013

ESET 349 Microcontroller Architecture, Fall 2018

Course Syllabus. Course Information

Introduction to Computer Systems

Cleveland State University

ESET 369 Embedded Systems Software, Fall 2017

Trina Gregory. Background. Contact

New York City College of Technology/CUNY Department of Computer Systems Technology. CST2400 Computer System Management and Support 4 hours 3 credits

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

CSCI 528: OBJECT ORIENTED PROGRAMMING, Fall 2015

MET CS 674 C1/EL Spring 2017: DATABASE SECURITY SYLLABUS

CASPER COLLEGE COURSE SYLLABUS MSFT 1600 Managing Microsoft Exchange Server 2003 Semester/Year: Fall 2007

COSE212: Programming Languages. Lecture 0 Course Overview

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1,2 and 3, Spring 2017

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

CMPE 152 Compiler Design

CMPE 152 Compiler Design

CS 6371: Advanced Programming Languages

PELLISSIPPI STATE TECHNICAL COMMUNITY COLLEGE MASTER SYLLABUS CIW JAVASCRIPT FUNDAMENTALS CERTIFICATION WEB 2391

Spring 2018 El Camino College E. Ambrosio. Course Syllabus

Introduction to Information Technology ITP 101x (4 Units)

CS61BL. Lecture 1: Welcome to CS61BL! Intro to Java and OOP Testing Error-handling

Course Syllabus: CompTIA Network+

ECE Object-Oriented Programming using C++ and Java

The Programming Process Summer 2010 Margaret Reid-Miller

CS 3270 Mobile Development for Android Syllabus

Red Hat Certified Engineer (RH300) 50 Cragwood Rd, Suite 350 South Plainfield, NJ 07080

Lecture 1: Overview & Intro to Java

Tutorials. Tutorial every Friday at 11:30 AM in Toldo 204 * discuss the next lab assignment

Philadelphia University Faculty of Information Technology Department of Computer Science --- Semester, 2007/2008. Course Syllabus

CSE115 Lab 9 Fall 2016

Compilers. Computer Science 431

MWF 9:00-9:50AM & 12:00-12:50PM (ET)

Course and Contact Information. Course Description. Course Objectives

COSC 115: Introduction to Web Authoring Fall 2013

CS Computer Science I

CS 240 Fall 2015 Section 004. Alvin Chao, Professor

Computer Science 210: Data Structures

San José State University Computer Science Department CS157A: Introduction to Database Management Systems Sections 5 and 6, Fall 2015

CS 121 Intro to Programming:Java - Lecture 2. Professor Robert Moll (+ TAs) CS BLDG

Transcription:

15-121 Introduction to Data Structures Lecture #1 Introduction 28 August 2019 Margaret Reid-Miller

Today Course Administration Overview of Course A (very basic) Java introduction Course website: www.cs.cmu.edu/~mrmiller/15-121 Fall 2018 15-121 (Reid-Miller) 2

Me Margaret Reid-Miller mrmiller@cs.cmu.edu Gates 6003, x 8-2640 I am an Assistant Teaching Professor CS Upperclass Academic Advisor What to call me? Margaret, please Fall 2018 15-121 (Reid-Miller) 3

Our Teaching Assistants Section A: Stephanie Ananth (sananth) Office Hours: 5:30pm-7:30pm Wednesday 3:00pm-5:00pm Sunday Section B: Darien Weems (dweems) Office Hours: 4:00pm-7:00pm Thursday 5:00pm-7:00pm Sunday Rooms to be determined Fall 2018 15-121 (Reid-Miller) 4

You Take 15-121 if you are an IS major (most of you), or if you don t plan to take another CS course. Take 15-122 if you are a CS or ECE major or minor, or plan to take more CS classes. Let s find out who s who (and how badly I pronounce your names ) Fall 2018 15-121 (Reid-Miller) 5

Formally: 15-112 Prerequisites In practice, you will need: Laptop or desktop computer The Java JDK and an editor or IDE Dr. Java (only runs Java 6 on Mac) Eclipse Standard Fall 2018 15-121 (Reid-Miller) 6

Introduction to Data Structures Data structures are ways to organize and store data and perform operations on the data efficiently. Create/understand algorithms Analyze algorithms (time/space efficiency) Which data structure we use will depend on What operations we expect to perform often on our data. What the performance tradeoffs are for access/update. Efficient algorithms are essential with big data (Think Google, database, Amazon, Facebook, ) This course provides a foundation for organizing large data sets for efficiency Fall 2018 15-121 (Reid-Miller) 7

Introduction to Data Structures This course provides a foundation for organizing large data sets for efficiency. Two parts: Conceptual information about various data structures How to use and implement those data structures in your programs. We assume you know how to write programs using fundamental programming concepts (variables, Booleans, conditional, loops, functions, lists, Fall 2018 15-121 (Reid-Miller) 8

Course logistics Course website: www.cs.cmu.edu/~mrmiller/15-121 Lectures: No electronic devices without prior permission (you re here to learn Data Structures) Bring notebook, paper, and pens/pencils to class every day. I often ask you to write code, and often will ask you to turn in what you write. Ask lots of questions (It helps your classmates who are equally curious and it gives me feedback.) Fall 2018 15-121 (Reid-Miller) 9

Course elements Lectures - notes posted to website after class Recitation labs 5% Participation 5% Quizzes 5% Homework 30% 2 Midterms 30%: 15% each Final 25% Fall 2018 15-121 (Reid-Miller) 10

Wednesday Recitations 5% In the computer lab (BH 140E) There will be weekly labs of short exercises. Only 10 count towards your grade. You must attend and participate to get credit. You may work collaboratively. Submitting after class will not be accepted. Tomorrow s recitation, though, will be a lecture! Fall 2018 15-121 (Reid-Miller) 11

Participation 5% You must attend lectures, ask questions, and do in-class exercises. If you miss a couple of days of class, you may still earn 100% for participation. If you miss class half the time, you will earn 0% for participation. Fall 2018 15-121 (Reid-Miller) 12

Quizzes 5% There will be short unannounced quizzes, approximately weekly. Tests the previous week s work. We will drop you lowest TWO quizzes. There will be no make-up quizzes for any reason. Fall 2018 15-121 (Reid-Miller) 13

2 Written Midterms 15% each During class on. No makeup exams except by prior approval by me for medical or family emergencies pre-arranged university-approved absences Fall 2018 15-121 (Reid-Miller) 14

During final exams. Final Exam 25% We will not proctor the final exam prior to the registrar scheduled exam, so do not leave Pittsburgh until after the last day of finals (makeup day). Fall 2018 15-121 (Reid-Miller) 15

Homework 30% There will be weekly homework assignments that include a written portion and programming. Due Monday(?) nights at 11:59pm. You are allowed up to 3 late days total without penalty, with a maximum of 1 late day per assignment. No credit will be given for late work after you have used up all your late days. Fall 2018 15-121 (Reid-Miller) 16

Academic Integrity You must do your own work. Discussion with other students is limited to clarifying the assignments or at a high noncode level (pictures). If you need help, ask the course staff or me. You should never look at another person s program nor allow another student to look at your program. Fall 2018 15-121 (Reid-Miller) 17

Most Common Cheating Strong student finishes assignment Weak student is working just before it is due. Asks for help from strong student Provides line-by-line coaching or provides solution Strong student goes to sleep Weak student turns in work by strong student Both students end up crying in my office Where did they go wrong? Fall 2018 15-121 (Reid-Miller) 18

What if I cheat on a assignment? Record a negative score on the assignment. Reduce your final semester letter grade. Prevent you from dropping, withdrawing, or changing to pass/fail. Send letters to Student Affairs, your advisor, various deans, etc. May result in long-term suspension. Fall 2018 15-121 (Reid-Miller) 19

Today ü Course Administration Overview of Course A (very basic) Java introduction Fall 2018 15-121 (Reid-Miller) 20

Course Topics Java, Objects, Arrays, ArrayLists, Efficiency Linked Lists, Recursion, Big-O Interfaces, Iterators, Stacks & Queues Searching & Sorting, Trees, BSTs, Recursion Sets & Maps, Hashing, Priority Queues, Heaps, Graphs, Review & Final Exam Fall 2018 15-121 (Reid-Miller) 21

Today ü Course Administration ü Overview of Course A (very basic) Java introduction Fall 2018 15-121 (Reid-Miller) 22

Program Translation Compiler - program that translates code in a highlevel source language, all at once, into low-level object or target language. E.g., translates Java to byte code. The code is translated only once and executed many times. Interpreter - program that translates and then executes only one (or several) statement(s) at a time. E.g., Python translates each time a statement is executed. Fall 2018 15-121 (Reid-Miller) 23

Traditional Compilation Different hardware/operating systems need slight variants of the program and separate compilers. Source Source code Source code code code compile Machine code Machine code Machine code Machine code Windows Intel Linux HP Linux IBM Mac OS X imac Fall 2018 15-121 (Reid-Miller) 24

Java Translation Java compiles to a single virtual machine. Game.java Game.class Compile JVM JVM JVM JVM Windows Intel Linux HP Interpret (or compile) Linux IBM Mac OS X imac JVM - Java Virtual Machine Fall 2018 15-121 (Reid-Miller) 25

Types of Programming Errors Compile-time error- Syntax errors found by the compiler or syntax-aware editors. e.g., x - * y = Run-time error - Error causes program to stop abnormally; often called an exception. e.g., x = y / z (What if z is zero?) Logical error - Program produces incorrect results without complaint. e.g., Sort program does not always sort the data Fall 2018 15-121 (Reid-Miller) 26

Java program structure Every Java program consists of one or more classes: Each class contains methods: Each method contains the statements (instructions) to be executed. The program starts its execution at the method called main and follows the instructions in the order specified. Fall 2018 15-121 (Reid-Miller) 27

Java Classes Java programs contain one or more classes, which are the basic units of code. The basic form of a Java class is at follows: Same name as the file name public class <name> { <method> <method> Keywords are in purple <method> } Fall 2018 15-121 (Reid-Miller) 28

The main method Every Java program must have a method named main of the form method header public static void main (String[] args) { } <statement> <statement> <statement> grouping characters The program execution starts at the main method. Fall 2018 15-121 (Reid-Miller) 29

A simple program /* * Prints three lines to the console. */ public class DreamDisplayer { Comments } public static void main(string[] args) { System.out.println("When I grow up... "); System.out.println(); // blank line } System.out.print("I want to be "); System.out.println( an astronaut."); println newline at end. print no newline System.out where to find the method. OUTPUT: When I grow up... Statements end with semicolons I want to be an astronaut. Fall 2018 15-121 (Reid-Miller) 30