is course Course sta Web site

29 downloads 44083 Views 3MB Size Report
Data Structures and Abstractions with Java,. 2nd ed. Frank M. Carrano, Prentice Hall,. 2007. –Should be available at campus store. –On reserve in library.
This course

CS/ENGRD 2112 Object-Oriented Design and Data Structures - Honors

An introduction to computer science and software engineering • Programming languages features, techniques • Object-oriented design - organizing large programs and managing complexity • Data structures and algorithms

Fall 2012 Andrew Myers Cornell University

Lecture 1: Introduction 1

Cornell University CS 2112 Fall ’12

Course staff

Web site

• Instructor: Prof. Andrew Myers • TA: Owen Arden • Undergrad TAs/consultants:

• Your source for information about this course: http://courses.cs.cornell.edu/cs2112 –Lecture notes • may be slides, or not • may not include everything covered in lecture • often updated after the lecture

–Reese Glidden –Daniel Jeng –Ari Karo –Matt Loring –Clara Thomas Cornell University CS 2112 Fall ’12

2

–Assignments • may be updated after initial release

–Pointers to resources 3

Cornell University CS 2112 Fall ’12

4

Communicating with staff

CMS

• Best way: use Piazza (http://piazza.com/class#fall2012/cs2112) to post questions –Answering other questions (well) has good karma. –Watch out for violating academic integrity

• Course announcements posted using Piazza (or emailed to all students) • Consultants–in Upson 328B, hours online

• Assignments will be submitted to CMS. • Grades, solutions will be posted on CMS (http://cms.csuglab.cs.cornell.edu) • Regrade requests should be posted to CMS soon after receiving grade.

–“Front line” for answering questions – consulting hours start today 5

Meetings

Assignments

• Lectures: TR 10:10-11, Phillips 203 • Discussion sections (attend 1 per week)

• 7 assignments –mostly programming but some written problems –total to 40% of total score

–Tuesday 12:20-1:10 (Upson 211) –Wednesday 1:25-2:15 (Olin 165)

• First 3 assignments done solo; final project done with a partner. • Assignment late penalties:

• Labs (attend 1 per week) –Monday 7:30-8:20 (Phillips 219) –Wednesday 7:30-8:20 (Phillips 203)

–1 day late: 10% –2 days late: 25% –3 days late: 40% –weekend = ‘1 day’

• 4 hours per week - attendance required Cornell University CS 2112 Fall ’12

6

7

Cornell University CS 2112 Fall ’12

8

Exams and more

Labs

• Two prelims: Oct 2 and Nov 13

• Will do programming exercises, solve problems, learn about tools • Bring a laptop • First lab already happened - don’t worry if you missed it.

–10%,15% of total score resp.

• Final exam: Dec 5, 7pm –30% of total score

• 5% of score: –participation (in-class, Piazza, course evals) –occasional in-class quizzes Cornell University CS 2112 Fall ’12

9

Textbook

10

Academic integrity

• Data Structures and Abstractions with Java, 2nd ed. Frank M. Carrano, Prentice Hall, 2007. –Should be available at campus store. –On reserve in library

• Not heavily used – can share with a friend or two.

Cornell University CS 2112 Fall ’12

Cornell University CS 2112 Fall ’12

11

• Work you turn in must be yours –You must be able to explain your answers fully –Copying code, answers is never okay –Letting others copy you also violates the Code –Discussions with others are fine...if they could have happened in a lightless room.

• We will use highly effective tools for detecting plagiarism. • Report any discussions on assignments. • Our goal: spend time on course content. Cornell University CS 2112 Fall ’12

12

CS 2112 or ENGRD 2112?

CS/ENGRD 2110 or CS/ENGRD 2112?

• Same course • Engineers, including CS majors → ENGRD 2112 (usually)

• 2112 is an fast-track version of 2110 aimed at CS majors. –harder assignments including a final project –more material

• Non-engineers → CS 2112

• e.g., more algorithms and their analysis (theory) • e.g., more about design, design patterns (practice)

–more credits (4 vs. 3) –smaller more individual attention Cornell University CS 2112 Fall ’12

13

Cornell University CS 2112 Fall ’12

14

What it’s about

2110 vs. 2112

An introduction to computer science and software engineering

• Warning: you may get splashed.

• Programming languages and programming techniques – recursive algorithms and data structures – data abstraction, subtyping, generic programming – concurrency and threads – GUIs, distributed programming, applets, ... CS 211 2

• Object-oriented design - organizing large programs – (object-oriented) specifications – testing and other validation techniques – design patterns – frameworks and event-driven programming

CS 2110

• Data structures and algorithms

15

– algorithm analysis and designing for efficiency – asymptotic complexity, induction – arrays, lists, stacks, queues, trees, graphs, hash tables Using Java. Not a course on Java!

16

State Transition Diagram of 8-Puzzle

Sam Loyd’s 8 Puzzle

Goal: Given an initial configuration of tiles, find a sequence of moves that will lead to the sorted configuration. A particular configuration is called a state of the puzzle.

19

17

State Transition Diagram for a 2x2 Puzzle

State Transition Diagram: picture of adjacent states. 20 A state Y is adjacent to state X if Y can be reached from X in one move.

18

Graphs • State transition diagram in previous slide is an an example of a graph: a mathematical abstraction –vertices (or nodes) : the puzzle states –edges (or arcs) : the transitions, possibly labeled

• Graphs are all around us : airline routes, roadmaps, org charts, pipelines, object graphs… • Large toolbox of good algorithms for graphs, e.g.:

v1 e1 v2

–searching effectively for best nodes/shortest paths –finding maximum flow through graph –minimum spanning tree

• And known hardness results (e.g., Hamiltonian cycles) 21

19

20

Software design choices

Why you need CS 2112

• What operations should puzzle objects have? • How do we represent states? The initial state? • What algorithm do we use to find a solution? • How do we present information to the user and support interaction? • How do we break the coding up into parts that can be coded independently? • How to structure code so it can be maintained, upgraded? 21

Next steps • Get your Piazza account set up ASAP • Download the first programming assignment, released today, due Sept. 4 • Make sure you have Eclipse downloaded and working. See consultants for help. • Keep an eye on the 2112 website too • Don’t forget about labs and recitations next week. 23

• Data structures and algorithms to solve problems efficiently and effectively • Design techniques to quickly produce code that works and keeps working. • Computer science: –algorithms, data structures, programming languages, design principles, knowledge of what is possible and feasible.

• Good programmers have more fun and more career opportunities –10x more productive –better able to adapt, grow, see opportunities

22