01 computer programming

Download 01 computer programming

Post on 18-Jul-2015




0 download

Embed Size (px)


<p>Computer ProgrammingKathmandu Engineering college</p> <p>11/26/201211/26/2012Computer ProgrammingDescription:Basic programming-in-the-small abilities and concepts. Highlights include procedural and functional abstraction with simple built-in data type manipulation. Basic abilities of writing, executing and debugging programs. </p> <p> 11/26/201211/26/2012So What is Programming Like?Its really hard to describe!</p> <p>Many similarities to solving word problems </p> <p>In math Translate a problem description into a formal solution Symbol </p> <p>Some people describe it as puzzle solving</p> <p>Some people describe it as problem solving</p> <p>A mix of high-level creativity and low-level picky details11/26/2012Added blank lines between bullets11/26/2012Stages of Problem SolvingUltimate goal: use a computer to solve a problem</p> <p> Typical stages of building a solution: Clearly specify the problem Analyze the problem Design an algorithm to solve the problem Implement the algorithm (write the program) Test and verify the completed program Maintain and update the program11/26/201211/26/2012FocusAll stages are important.</p> <p>In this course, we ignore none of them But we focus on:</p> <p> Algorithm development Writing a program to implement the algorithm</p> <p>11/26/201211/26/2012CT 401: COURSE STRUCTURE100 Marks course</p> <p>Course Organization:Lecture: 4 periods a weekTutorial: 1 period a week10 minutes of Quiz session during each lecture5 Programming projects (To be done by you outside of class, on your own time)Two midterm examsFinal exam</p> <p>11/26/201211/26/2012CT 401: GoalsWe will learnRead: Understand programs written in C languageWrite: Design and implement programs using C languageCompile: Use compiler to convert C code into executable fileExecute: Run corresponding code to get results Debug: Identify and fix syntax and semantic errors in C code.Prepare: Have Base for learning other high level languages like C++, JAVA, etc.11/26/2012Using the BOOKNot everything in the course will be covered in the slides. So you are required to refer the BOOKS</p> <p>Not everything, instructor says, from the slides will be correct and complete. So you need to verify the contents using the BOOK and submit the summary report in the NEXT CLASS</p> <p>You need both! And then some...11/26/201211/26/2012Beyond the BOOKS/SLIDESYou wont learn programming by reading the BOOKS as might you read the other theoretical subjects</p> <p>You wont learn programming by watching the lectures slides as might you watch a TV program </p> <p>What you need in addition is:The ability to ask questions and get them answeredAnd most important: hands-on practice11/26/201211/26/2012The Importance of PracticeYou wouldnt expect to learn to SING/DANCE just by watching a TV series on itThere is no substitute for practice. And no one can do it for you.</p> <p>The same holds for learning to program.11/26/201211/26/2012Tips for SuccessTake the material in orderWith rare exceptions:you cant skip any lecture but I wont take attendance you cant take material out of order</p> <p>Seek help if you get behindPractice, Practice .. And MORE PRACTICE!</p> <p> Master each topic before continuing to the next</p> <p>11/26/201211/26/2012Where Do You Go From Here?The next course is Object Oriented Programming (OOP) in the third semesterA direct continuation of Computer ProgrammingOOP introduces the C++ programming language</p> <p>On the fourth-semester course called "Data Structures continues with the application of C/C++ programming Languages</p> <p>11/26/2012What is OOP like?100 marks; 4-5 projects15-30 files in later projects (you dont write all)Students say:"intense", "time-consuming"Language: C++Initially just like CLearn programming concepts to support writing larger programsEventually objects + classes (object-oriented)</p> <p>11/26/2012What is Covered in a 2nd and 3rd Courses?Lots of programming practicebut less class discussion of itData structuresmany involving pointersabstract data types (ADTs)Algorithmsmany recursiveProblem-solving &amp; designFoundation for later CS courses11/26/2012Going on in CThere is much about the C language we won't cover</p> <p>You will have a foundation to master more advanced C programming features at the end of the course</p> <p>Learning more C may or may not be useful but you are required to PASS the EXAMS for completing your degree11/26/2012Programming ConceptsWe will use C, but the concepts go beyond the C languageVariables; data types; valuesConditions: conditional statements and conditional executionLoopsRecursionFunctions: parameters (including pointers), call/returnData structuring: arrays; structures; Input/Output11/26/2012Beyond ProgrammingCompiler conceptssyntax vs semantics; compilation steps; libraries; debuggingWhat is a computer?Visualize memory, CPU, I/O operationInstruction execution, data movementProblem solvingAbstractionFunctional decomposition, Data decompositionAlgorithms11/26/2012Building and Understanding SoftwareSoftware give computer its personalityComputers are booming I.e., software is.Programs are complex thingsCompare to a bridge or a novelWhat's the effect of a small error?Humanizing complexityAnalysis, design, testing, communicating11/26/2012Next ClassProblems, Algorithms, and Programs11/26/2012Who am I?Manish Aryal Head, Department of Computer EngineeringB.E. Computer (KEC, 2003)M.S. Information and Communication Engineering (Pulchowk Campus, 2005)Working @ KEC for last EIGHT Years9841285747manish@keckist.edu.nphttps://www.facebook.com/aryalmanish7:00 AM 4:30 PM, Monday- Friday11/26/2012Is Programming Hard or is Programming Fun?Advanced Programming is HARD but Your Programming Course is also HARD</p> <p>Best of Luck for the Course. See You in the Next Class. </p> <p>11/26/2012FUN ...</p>