27
June 19, 2008 1 Liang-Jun Zhang Liang-Jun Zhang MTWRF 9:45-11:15 am MTWRF 9:45-11:15 am Sitterson Hall 011 Sitterson Hall 011 Comp 110 Comp 110 Introduction to Programming Introduction to Programming

June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

Embed Size (px)

Citation preview

Page 1: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 1

Liang-Jun ZhangLiang-Jun ZhangMTWRF 9:45-11:15 amMTWRF 9:45-11:15 am

Sitterson Hall 011Sitterson Hall 011

Comp 110Comp 110Introduction to ProgrammingIntroduction to Programming

Comp 110Comp 110Introduction to ProgrammingIntroduction to Programming

Page 2: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 2

Outline

• Course Introduction

• Administrative things

Page 3: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 3

What Is Programming?• Crafting a set of instructions to solve a

problem• Analogy: cooking recipes

– Ingredients (potatoes, banana, tofu, milk)– Procedures (cut, fry, stew, mix)– Results (potato banana ice cream)

– Hello world demo– Sorting algorithm demo– http://www.Kayak.com

ProgramInput Output

Page 4: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 4

What Is Programming?

• Who “reads” computer programs?– The physical computer– Humans (yourself, your coworkers,

your instructor)

• Must be clear and well-structured• Programming with pen and paper

Page 5: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 5

• Learn the basic components of computer programming– can be applied to any programming

language (Java, C++, etc.)

• Is COMP 110 right for you?– Require basic computer skills– No programming knowledge assumed

• Math, algebra

About COMP 110

Page 6: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 6

Is COMP 110 Right for You?

• Do you have web programming experience with Java, perl, php?

• Experience with “classes” in C++?• Some experience with Matlab, Mathematica?• Do you know what is meant by Object, method,

member variable, recursion, array, sorting algorithms?

If yes to any, you may be ready for COMP401 instead.

Page 7: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 7

About Me

• UNC Ph.D. student, will start 4th year

• Research interests - Robotics, graphics

• http://www.cs.unc.edu/~zlj

[email protected]

• Sitterson 330, 919-962-1737(O)

Page 8: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 8

About You

• Introduce yourself to the class - name - year - major - something special about you …

Page 9: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 9

Course Webpage

• http://www.cs.unc.edu/~zlj/comp110

• UNC Blackboard System– http://blackboard.unc.edu– Lecture notes– Sample codes– Assignments– Checking grades

Page 10: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 10

Weekly Schedule• Lecture

– MTWRF, 9:45-11:15 am, Sitterson Hall 011

– Bring your laptop– Needn’t bring the textbook

• Schedule• Office Hours

– MTWR 1:00-3:00PM, SN-019 (PC-Lab)– Extra office hours by appointment

Page 11: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 11

Lecture Format• Review previous material

– Answer any questions

• Present new material– Notebook computers closed please

• In-class exercises and programming– use laptop computer – work individually or in groups

• Feel free to ask questions anytime

Page 12: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 12

Lecture Notes

• Will be posted shortly after lecture– Might be modified

Page 13: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 13

TextbookRequiredJava Programming: From Problem Analysis to Program DesignD. Malik

The 3rd edition: ISBN 1-4239-0135-5

Page 14: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 14

Software

• Java SDK (JDK)• jGRASP

– Please install them on your laptop• See the homework 0

• We’ll do a tour tomorrow

Page 15: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 15

Grades

Programming Assignments

45 %

Quizzes 15 %

Midterm Exam 10 %

Final Exam 25 %

Class Participation 5 %

Page 16: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 16

Assignments• Homework assignments from textbook

– practice for exams

• Programming assignments– May need to demonstrate the executable code by yourself – budget 8-10 hours per program

• design, code, debugging

– start early!

• Deadline– For assignments needed to turn in, the deadlines are due at

10:59pm on the due date– For assignments needed to demonstrate, the deadlines are

before the demo time.

Page 17: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 17

Submitting Assignments

• All programming assignments will be submitted through Blackboard– Include the demo codes

• All assignments must include the honor code pledge– I need signed pledge on paper.– Make it the first thing you put onto any

assignment.

• http://cs.unc.edu/~zlj/comp110/assignments.html

Page 18: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 18

Collaborating• You can

– talk to each other about the lecture topics– talk about assignment requirements– work in groups during recitation on recitation

assignments only• You should

– do your own assignments -- design and code• You should never

– talk to each other about assignment solutions– share code -- it is easy to detect and we will

prosecute Pledge Form

Page 19: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 19

Late Policy

• Late submission - if less than 24hrs : 25% off - if less than 48hrs : 50% off - not accepted after 48 hrs

Page 20: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 20

Before Coding

• Before you open jGRASP and start coding– read the assignment– think about what the assignment is asking for– review lectures and examples on the topic– write (yes, on paper) your plan for completing

the assignment (i.e., your algorithm)• talk to/email me if you’re having trouble at this point

Page 21: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 21

Backup Your Work!

• Backup your work frequently!

• You will lose something at some point– you might have to learn the hard way

• Use your AFS(Andrew File System) space– use of AFS space is not required, but is

recommended– you can install the AFS Client to your notebook

Page 22: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 22

Quizzes and Exams

• Three or fours quizzes

• Middle exam (around Jul 9) • Final exam (Jul 24, 8:00-11:00 AM)

Page 23: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 23

Help!

• For help on general computer problems, including getting AFS enabled on your laptop or at home

• For help on the course related problems, ask the instructor

http://help.unc.eduhttp://help.unc.edu962-HELP962-HELP

Page 24: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 24

Sending Email to me

• Put COMP 110 in subject line

• For example:– COMP 110, I’m lost– COMP 110, This course is too easy

Page 25: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 25

Introduction of jGrasp

• Demo

Page 26: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 26

Homework 0• Sign the paper pledge form• Turn on the Answer the answers in the

survey through blackboard• Install JDK & jGRASP

– JDK 6 Update 6• http://java.sun.com/javase/downloads/index.jsp

– jGRASP 1.8.6_08 (March 21, 2008) • http://spider.eng.auburn.edu/user-cgi/grasp/

grasp.pl?;dl=download_jgrasp.html

– Run sample Java program– If you cannot install or run JDK or jGrasp,

bring your laptop tomorrow to the class.

Page 27: June 19, 20081 Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming

June 19, 2008 27

Next Class• Overview of computers and

programming languages

• Turn in pledge form• Turn in the course survey 10:59PM, Jun

19• Bring your laptop