ta zc164

download ta zc164

of 5

description

BITS-Computer Programming-Course hangout

Transcript of ta zc164

BIRLA INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI

Birla Institute of Technology & Science, PilaniWork-Integrated Learning Programmes DivisionFirst Semester 2014-2015

Course Handout

Course No. : TA ZC164

Course Title : Computer Programming

Instructor : Vimal SP

Course Description

The course covers the following topics through lectures: Basic Model of a Computer; Problem Solving Basic Computing Steps and Flow Charting (Assignment, Sequencing, Conditionals, Iteration). Programming Constructs Expressions, Statements, Conditionals, Iterators/Loops, Functions/Procedures; Data Types Primitive Types, Tuples, Lists/Arrays, Pointers and. Input output and Files. While the programming methodology would be generic, we shall exemplify the concepts using MATLAB.

Programming exercises are provided which involves the development and testing of iterative and procedural programs using bounded and unbounded iterations, function composition, random access lists, sequential access lists, dynamically allocated lists, and file access.

Scope and Objectives

The primary goals of the course are to introduce: basic representation of data and how to process data using the representation inside a computer. techniques for specifying data and operations on data using a programming language systematic techniques and approaches for constructing programs.

Prescribed Text Books

T1. Stephen J. Chapman Matlab Programming for Engineers, 4th Ed. Cengage Learning. (Available from Books24x7)

Reference Books

R1. Attaway, Stormy. Matlab: A Practical Introduction to Programming and Problem Solving. Butterworth-Heinemann. (Available from Books24x7)R2. R.J. Dromey. Problem Solving using Computer. Prentice Hall India. Eastern Economy Edition. 2002.

TA ZC164 (Course Handout) First Semester 2014-2015 Page 2

Lecture Plan:

Lecture 1: Learning ObjectivesIntroduction to Programming and MATLABTopics(Recorded Lectures Number)Computers and Programming (RL1.1) , Programming Languages Types(RL1.2), Problem solving(RL 2.1), Introduction to the MATLAB environment(RL 2.2), Using MATLAB Documentation (RL .3)

Contact Session (in addition to the brief overview to the recorded content)Introduction to the course, Operating methodologyIntroduce the MATLAB environment, Using documentation

ReferencesR1: Section 1.1, 1.2, 1.3

Lecture 2: Learning ObjectivesUnderstanding Arrays in MATLAB, Representation and Operation on ArraysTopics(Recorded Lectures Number)Arrays: Creation (RL 3.1), Accessing Elements(RL 3.2) , Sub Arrays(RL 3.3), Representation(RL 3.3), Operations (RL 3.4)

Contact Sessions (in addition to the brief overview to the recorded content)Exercises on various methods of arrays creation and initialization, Linear Addressing, Accessing and modifying sub arrays, Arrays and Matrix Operations

ReferencesT1: Sections 2.1, 2.3, 2.4

Lecture 3: Learning ObjectivesUnderstanding the Problem Solving Process and to write small MATLAB programsTopics(Recorded Lectures Number)Input, Output statements (RL 4.1), MATLAB Scripts (RL 4.2), Problem Solving (RL 5.1), Algorithms(RL 5.2), Flow Chart (RL 5.3)

Contact Sessions (in addition to the brief overview to the recorded content)Exercises on designing algorithms, drawing flowcharts using sequence, selection, and iterative constructs.Writing small programs involving I/O and executing it.

ReferencesT1 Section 3.2, R1: Chapter 5

Lecture 4: Learning ObjectivesLearning to write programs using selectionTopics(Recorded Lectures Number)Condition: Relational and Logical Expressions (RL 6.1), Conditional Statements (if statement) (RL 6.2), Choosing from Multiple Alternatives (RL 6.3)

Contact Sessions (in addition to the brief overview to the recorded content)Exercises in writing conditions using relational, logical operations, writing programs involving if statement, if-else, if- elseif and switch case statements in MATLAB

ReferencesT1: Sections 3.3, 3.4 9

TA ZC164 (Course Handout) First Semester 2014-2015 Page 3

Lecture 5: Learning ObjectivesLearning to write programs using iteration/repetitionTopics(Recorded Lectures Number)For Loop (RL 7.1), While Loop (RL 7.2), Break and Continue Statements(RL 7.3), Logical Arrays and Vectorization (RL 7.4)

Contact Sessions (in addition to the brief overview to the recorded content)Write programs involving for-loop, while-loop and nested loops.Exercises in vectorizing programs involving loops and decisions.

ReferencesT1: Sections 4.1-4.3

Lecture 6: Learning ObjectivesLearning create manipulate string data and plotting functions in MATLABTopics(Recorded Lectures Number)Strings Representation and Creation (RL 8.1), String Operations and MATLAB Functions (RL 8.2), Simple Plots (RL 9.1), Multiple Plots, Subplots (RL 9.2)

Contact Sessions (in addition to the brief overview to the recorded content)Implementing MATLAB string manipulation functions, as scripts using iteration.Plotting functions using plot function.

ReferencesT1: Section 6.2, 2.11

Lecture 7-8: Learning ObjectivesUnderstanding top down design, and writing modular programs using user-defined functions in MATLABTopics(Recorded Lectures Number)Top Down Design (RL 10.1), Functions in MATLAB (RL 10.2), Parameter Passing in MATLAB (RL 10.3), Functions with Optional Parameters(RL 10.4),

Contact Sessions (in addition to the brief overview to the recorded content)Exercises in solving problems using top down design, implementing modules using functions

ReferencesT1: Chapter 5.1-5.3

Lecture 9: Review of Topics from Lecture 1-8 Syllabus for Mid-Semester Test (Closed Book): Topics in Lecture. No. 1 to 9

Lecture 10: Learning ObjectivesWriting functions using optional parameters, global/persistent variables, sub functionsTopics(Recorded Lectures Number)Functions with Optional Parameters(RL 10.4), Sharing Data between Function using Global Memory (RL 10.5), Preserving Data Between Calls to a Function (RL 10.6), Sub Functions (RL 10.7)

Contact Sessions (in addition to the brief overview to the recorded content)Exercises in writing functions in which uses optional parameters, global variables, persistent data and sub functions.

ReferencesT1: Chapter 5.4-5.5, 5.7.1

TA ZC164 (Course Handout) First Semester 2014-2015 Page 4

Lecture 11: Learning ObjectivesWriting higher order functions in MATLABTopics(Recorded Lectures Number)Anonymous functions (RL 11.1), Function Functions (RL 11.2)

Contact Sessions (in addition to the brief overview to the recorded content)Exercises in writing anonymous functions, function handles, and function functions in MATLAB

ReferencesT1: Chapter 5.6,

Lecture 12: Learning ObjectivesWriting recursive functions in MALTLABTopics(Recorded Lectures Number)Recursion (RL 11.3)

Contact Sessions (in addition to the brief overview to the recorded content)Exercises in writing recursive and iterative programs for problems

ReferencesR1: Chapter 9.5

Lecture 13: Learning ObjectivesStructured Data: StructuresTopics(Recorded Lectures Number)Structures in MATLAB (RL 12.1), Nesting Strutures (RL 12.2), Array of Structures (RL 12.3), Passing Structures (RL 12.4), array of structures functions (RL 12.5) , returning from functions (RL 12.6)

Contact Sessions (in addition to the brief overview to the recorded content)Exercises in writing programs using structures, arrays of structures, writing functions with structures as arguments, and returning from functions

ReferencesT1: Chapter 7.3

Lecture 14: Learning ObjectivesStructured Data: Cell ArraysTopics(Recorded Lectures Number)Cell Arrays (RL 13.1), Creating and Accessing Cell Arrays (RL 13.2), Significance of Cell Arrays (RL 13.3), Passing Cell Arrays and returning from Functions (RL 13.4), List of strings Representations using Cell Arrays (RL 13.5)

Contact Sessions (in addition to the brief overview to the recorded content)Exercises in writing programs using cell arrays, accessing elements, writing functions with cell arrays as arguments, and returning from functions

ReferencesT1: Chapter 7.2

Lecture 15: Learning ObjectivesFile I/O: Saving and retrieving files, variables, workspaces. Formatted output using fprintfTopics(Recorded Lectures Number)Files: Introduction (RL 14.1), Preserving Variables and Data (RL 14.2)

Contact Sessions (in addition to the brief overview to the recorded content)Exercises in writing matrix as files, retrieving and manipulating. Exercises in formatted output using fprintf on matrices, for various formats, and data.

ReferencesT1: Chapter 14

TA ZC164 (Course Handout) First Semester 2014-2015 Page 5

Lecture 16: Learning ObjectivesFormatted File IOTopics(Recorded Lectures Number)File Opening and closing(RL 14.3), Formatted Functions (RL 14.4)

Contact Sessions (in addition to the brief overview to the recorded content)Programs which manipulate formatted files, reading input data from formatted files, writing output, modifying contents in files

ReferencesT1: Chapter 14

Lecture 17: Learning ObjectivesBinary I/O, Random access FunctionsTopics(Recorded Lectures Number)Binary I/O functions (RL 14.5), Binary I/O vs Formatted I/O (RL 14.6), File Positioning and Status Functions (RL 14.7)

Contact Sessions (in addition to the brief overview to the recorded content)Programs using binary File I/O and Random access functions

ReferencesT1: Chapter 14

Lecture 18: Review of Topics from Lecture 10-17Syllabus for Comprehensive Exam (Open Book): All topics covered in the course from Lecture No. 1 to18

Evaluation Scheme:

EC No.Evaluation Component & Type of ExaminationDurationWeigh-tageDay, Date, Session,Time

EC-1Assignment/Quiz * To be announced 15%* To be announced

EC-2Mid-Semester Test(Closed Book)2 Hours35%Sunday, 14/09/2014 (FN)10 AM 12 Noon

EC-3Comprehensive Exam (Open Book)3 Hours50%Sunday, 09/11/2014 (FN)9 AM 12 Noon

* For details of EC-1 Assignment/Quiz, please check the WILP LMS Taxila web site www.taxila.bits-pilani.ac.in by July 26, 2014.

AN: AfterNoon Session; FN: ForeNoon Session

Closed Book Test: No reference material of any kind will be permitted inside the exam hall.Open Book Exam: Use of any printed / written reference material (books and notebooks) will be permitted inside the exam hall. Loose sheets of paper will not be permitted. Computers of any kind will not be allowed inside the exam hall. Use of calculators will be allowed in all exams. No exchange of any material will be allowed.

Note: It shall be the responsibility of the individual student to be regular in maintaining the self study schedule as given in the course handout, attend the online/on demand lectures as per details that would be put up in the BITS LMS Taxila website www.taxila.bits-pilani.ac.in and take all the prescribed components of the evaluation such as Assignment (Course Page on LMS Taxila), Mid Semester Test and Comprehensive Examination according to the Evaluation Scheme given in the respective Course Handout. If the student is unable to appear for the Regular Test/Examination due to genuine exigencies, the student must refer to the procedure for applying for Make-up Test/Examination, which will be available through the Important Information link on the BITS WILP LMS Taxila website www.taxila.bits-pilani.ac.in on the date of the Regular Test/Examination. The Make-up Tests/Exams will be conducted only at selected exam centres on the dates to be announced later.

Instructor-in-Charge