Download presentation
Presentation is loading. Please wait.
Published byDella Primrose Lewis Modified over 8 years ago
1
IBA, SPRING 2014 FACULTY OF COMPUTER SCIENCE Introduction to Programming 1 Introduction to Programming CSE:141 (ERP Number: 30313)
2
Introduction to Programming 2 Instructor’s Name:Saman Zehra Rizvi szehra@iba.edu.pk sszr486@hotmail.com Room No. MCC11 MCL 2 (Lab) Class Timings08:30 to 09:45 / 10:30 to 11:45 Monday & Wednesday Counseling Hours: Main Campus: Mon/Wed 12:00-01:00 City Campus: By Appointment
3
ERP & LMS Introduction to Programming 3 ERP NUMBER LMS SAKAI LOGIN ID (& PASSWORD….NATURALLY!) Frequent use Classwork and Homework Assignment Quizzes Lecture Slides Almost everything…
4
Course Objectives Introduction to Programming 4 Provide solid foundations in the basic concepts of programming. Focuses on common computational problem solving techniques. Use Java for implementation.
5
Course Goal Introduction to Programming 5 Develop skills in Computational thinking Ability to use vocabulary used in programming Ability to map described problem into program Program that are appropriate for problems that might occur in practice.
6
Grading Introduction to Programming 6 Quizzes 10% 2 announced quizzes 2 surprise quizzes 1 announced and 1 surprise quiz will be graded Assignment 10% 2 Mid-Terms30% Term project10% Final40% No early or makeup exams please! Identical assignments will receive identical marks..i.e. 0!
7
Text/Reference Books Introduction to Programming 7 Java: How to program, Deitel and Deitel Programming and problem solving with Java by Nell Dale and Chip Weems Introduction to Programming with Java: A Problem Solving Approach by John Dean, Parkville and Ray Dean Java: An Introduction to Problem Solving and Programming, 5/E by Walter Savitch How to Program Using Java by Tony Jenkins and Graham Hardman Palgrave Macmillan Java in a Nutshell by David Flanagan
8
Tentative Topics List Introduction to Programming 8 Overview of programming Basic control flow Functions Problems, Algorithms and Programs Variables, Values and Types Arithmetic Expressions Input and Output (I/O) Conditional Functions Function Parameters Iteration Loop Development Complex Conditions Functions and Design Arrays Linear & Binary Search Sorting Multidimensional Arrays Structures Strings Nested Data Structures File Input/Output Program Style Structuring Program Files Recursive Binary Search Recursion Switch Statement
9
Tools/IDEs Introduction to Programming 9 Java Standard Edition (SE) and JDK 6 Eclipse (Netbeans)
10
Web Resources Introduction to Programming 10 http://java.sun.com/j2se/ (Standard Edition) http://www.eclipse.org http://java.sun.com/docs/books/tutorial/java/ http://www.javaworld.com http://jcp.org http://eclipsetutorial.sourceforge.net/totalbeginner.html http://java.sun.com/j2se/ http://www.eclipse.org http://java.sun.com/docs/books/tutorial/java/ http://www.javaworld.com http://jcp.org http://eclipsetutorial.sourceforge.net/totalbeginner.html
11
Your Introduction Introduction to Programming 11 Academic Background Programming Knowledge Expectations Why FCS IBA ?
12
Introduction Introduction to Programming 12 Programs takes input (or may not take any input actually) and produce output according to the instructions. Computer has two major component: Hardware(memory, processor, I/O devices) Software(system and application programs, compilers)
13
Software Categories Introduction to Programming 13 Software : program which contains a list of instructions that a computer uses in order to function. System Programs Needed to keep all the hardware and software systems running together smoothly. Examples: Operating Systems like Linux, Windows, Unix, Mac OS Application Program Program that people use to get their work done. Examples: Word Processor, Game programs, Spreadsheets Compiler Transforms high level code into machine level that is understandable by machines.
14
Machine Language? Introduction to Programming 14 The machine language of a particular computer is a language of binary codes that can be directly interpreted by the hardware comprising the CPU. Elemental language of computers, comprising a long sequence of binary digital zeros and ones (bits). Ultimately, the output of any programming language analysis and processing emerges in the form of machine code. Each processor has its own specific machine language.
15
Machine Language? Introduction to Programming 15 Writing in machine language? Painful ! Difficult to keep track of what all the bits mean? Compilers and interpreters let a programmer specify computations in a language that has some of the convenience and naturalness of human languages But encourages a certain discipline and level of precision.
16
Introduction to Programming 16 A programming language is a standardized communication technique for expressing instructions to a computer. Different types of programming languages used to create programs: Java, Pascal, C, C++, C#, visual basic To execute a program regardless of any language, instructions are translated into machine language that can be understood by computers.
17
Categories of Programming Languages Introduction to Programming 17 High level Languages Low level Note: the term high level and low level are inherently relative, Originally, assembly language was considered low-level and COBOL, C, etc. were considered high-level. Many programmers today might refer to these latter languages as low-level.
18
Categories of Programming Languages Introduction to Programming 18 High level Languages User friendly, To some extent platform-independent, Abstract from low-level computer processor operations such as memory accesses. A programming statement may be translated into one or several machine instructions by a compiler. Examples are Java, C, C++, Basic, Fortran
19
Categories of Programming Languages Introduction to Programming 19 Low level Assembly languages are similar to machine languages But they are much easier to program => allow a programmer to substitute names for numbers Each instruction is translated into one machine instruction by an assembler program.
20
Program Development Process Introduction to Programming 20 The basic steps in trying to solve a problem on the computer are: Problem Definition Problem Analysis Algorithm design and representation (Pseudocode or flowchart) Coding and debugging
21
Problem Definition Introduction to Programming 21 The problem must be well and clearly defined first, in terms of its input and output requirements. A clearly defined problem is already half the solution. Computer programming requires us to define the problem first before we even try to create a solution. Example “Create a program that will determine the number of times a name occurs in a list.”
22
Problem Analysis Introduction to Programming 22 After the problem has been defined, the simplest, efficient and effective approach to solve the problem must be formulated. Usually, this step involves breaking up the problem into smaller and simpler sub-problems. Problem: Determine the number of times a name occurs in a list Input to the program: List of names Name to look for Output of the program: The number of times the name occurs in a list.
23
Algorithms Design and Representation Introduction to Programming 23 Algorithm: Clear and unambiguous specification of the steps needed to solve a problem. It may be expressed in either Human language (English). A graphical representation like a flowchart. A code representation like a pseudocode.
24
Expressing Solution Through Human Language Introduction to Programming 24 1. Get the list of names 2. Get the name to look for, let's call this the keyname 3. Compare the keyname to each of the names in the list 4. If the keyname is the same with a name in the list, add 1 to the count 5. If all the names have been compared, output the result count
25
Expressing Solution Through Pseudocode Introduction to Programming 25 Let nameList = List of Names Let keyName = the name to be sought Let Count = 0 For each name in NameList do the following if name == keyName Count = Count + 1 Display Count
26
Expressing Solution Through Flowchart Introduction to Programming 26
27
Coding And Debugging Introduction to Programming 27 Using the algorithm as basis, the source code can now be written using the chosen programming language. This process is called coding. The programmer has to add some fixes to the program in case of errors (also called bugs) that occurs in the program. This process is called debugging.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.