+ All Categories
Home > Education > CS201- Introduction to Programming- Lecture 01

CS201- Introduction to Programming- Lecture 01

Date post: 10-Jul-2015
Category:
Upload: bilal-ahmed
View: 40 times
Download: 1 times
Share this document with a friend
Popular Tags:
19
Introduction to Programming Introduction to Programming Lecture No. 1 Lecture No. 1
Transcript
Page 1: CS201- Introduction to Programming- Lecture 01

Introduction to ProgrammingIntroduction to Programming

Lecture No. 1Lecture No. 1

Page 2: CS201- Introduction to Programming- Lecture 01

ProgramProgram

““A precise A precise sequence of sequence of

steps tosteps tosolve a solve a particular particular problem”problem”

Page 3: CS201- Introduction to Programming- Lecture 01

Alan Perl is – Yale University:Alan Perl is – Yale University:

““It goes against the grain of modernIt goes against the grain of modern education to teach children to program.education to teach children to program. What fun is there in making plans,What fun is there in making plans, acquiring discipline in organizingacquiring discipline in organizing thoughts, devoting attention to detailthoughts, devoting attention to detail and learning to be self-critical? “and learning to be self-critical? “

Page 4: CS201- Introduction to Programming- Lecture 01

Crit ical Skil lsCrit ical Skil ls– AnalysisAnalysis– Critical Critical

ThinkingThinking– Attention Attention

to Detailto Detail

Page 5: CS201- Introduction to Programming- Lecture 01

Design RecipeDesign RecipeTo design a program properly, we To design a program properly, we

must:must:– Analyze a problem statement, typicallyAnalyze a problem statement, typically expressed as a word problemexpressed as a word problem– Express its essence, abstractly and withExpress its essence, abstractly and with examplesexamples– Formulate statements and comments in aFormulate statements and comments in a precise languageprecise language– Evaluate and revise the activit ies in l ight Evaluate and revise the activit ies in l ight

ofof checks and testschecks and tests

Page 6: CS201- Introduction to Programming- Lecture 01

– PAY ATTENTION TO DETAILPAY ATTENTION TO DETAIL– These skil ls are useful forThese skil ls are useful for anybodyanybody– All assignments in this courseAll assignments in this course should follow the theseshould follow the these guidelinesguidelines

Page 7: CS201- Introduction to Programming- Lecture 01

Computers are Computers are

STUPIDSTUPID

Page 8: CS201- Introduction to Programming- Lecture 01

HumansHumans are are even more…….even more…….

Page 9: CS201- Introduction to Programming- Lecture 01

Think ReuseThink Reuse

Page 10: CS201- Introduction to Programming- Lecture 01

Area of the RingArea of the Ring

Outer Circle

Inner Circle

Area of Inner Circle____Area of Outer Circle = Area of the Ring

Page 11: CS201- Introduction to Programming- Lecture 01

Think ReuseThink Reuse Think User InterfaceThink User Interface Comments l iberally Comments l iberally

Page 12: CS201- Introduction to Programming- Lecture 01

What is the probability that she getsWhat is the probability that she gets exactly three letter right i.e. threeexactly three letter right i.e. three Letters into their correct envelopes.Letters into their correct envelopes.

Page 13: CS201- Introduction to Programming- Lecture 01

Logical ErrorLogical ErrorLewis Carol: “Through the Looking Glass”Lewis Carol: “Through the Looking Glass”

““Twas brillig, and the slithy tovesTwas brillig, and the slithy tovesDid gyre and gimble in the wabe “Did gyre and gimble in the wabe “

Page 14: CS201- Introduction to Programming- Lecture 01

Course PolicyCourse PolicyPolicy for the distribution of marks andPolicy for the distribution of marks andexamination is as followsexamination is as follows Assignments 15%Assignments 15% Group discussion 5%Group discussion 5% Midterm 35 %Midterm 35 % Final 45 %Final 45 %

Page 15: CS201- Introduction to Programming- Lecture 01

BooksBooks Deitel & Deitel :– C++ How to ProgramDeitel & Deitel :– C++ How to Program Kernighan and Ritchie:-Kernighan and Ritchie:- The C Programming LanguageThe C Programming Language

Page 16: CS201- Introduction to Programming- Lecture 01

Course ObjectivesCourse Objectives

Objectives of this course are three foldObjectives of this course are three fold1.1. To appreciate the need for a To appreciate the need for a

programming languageprogramming language2.2. To introduce the concept and usability To introduce the concept and usability

of the structured programming of the structured programming methodologymethodology

3.3. To develop proficiency in making useful To develop proficiency in making useful software using the C language software using the C language

Page 17: CS201- Introduction to Programming- Lecture 01

Course ContentsCourse ContentsTo achieve our first two objectives weTo achieve our first two objectives wewill be discussingwill be discussing Basic Programming constructs andBasic Programming constructs and building blocksbuilding blocks Structured programmingStructured programming Structured flowcharts, pseudo-codeStructured flowcharts, pseudo-code

Page 18: CS201- Introduction to Programming- Lecture 01

Course ContentsCourse Contents History of C LanguageHistory of C Language Variables and expressions in CVariables and expressions in C Control structures and Control structures and

functions functions Arrays and PointersArrays and Pointers Dynamic memory AllocationDynamic memory Allocation

Page 19: CS201- Introduction to Programming- Lecture 01

Course ContentsCourse Contents File handling File handling Structures and UnionsStructures and Unions Flavor of Object oriented Flavor of Object oriented

programmingprogramming


Recommended