Programming & languages

Slides:



Advertisements
Similar presentations
CS101: Introduction to Computer programming
Advertisements

Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Programming System development life cycle Life cycle of a program
McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Programming and Languages.
CHAPTER Programming MIS105 Week-14/ Lec02 Irfan Ahmed Ilyas.
Programming and Languages Chapter Competencies (Page 1 of 2) Describe the six steps of programming Discuss design tools including top-down design,
McGraw-Hill Technology Education © 2006 by the McGraw-Hill Companies, Inc. All rights reserved CHAPTER PROGRAMMING AND LANGUAGES.
1414 CHAPTER PROGRAMMING AND LANGUAGES. © 2005 The McGraw-Hill Companies, Inc. All Rights Reserved Competencies Describe the six steps of programming.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
PRE-PROGRAMMING PHASE
Programming Logic and System Analysis
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
The University of Texas – Pan American
Structured COBOL Programming, Stern & Stern, 9th edition
CSC-115 Introduction to Computer Programming
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Dale Roberts 1 Program Control - Algorithms Department of Computer and Information Science, School of Science, IUPUI CSCI N305.
Programming and Languages
Chapter 14 Programming and Languages McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Copyright © 2012 The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Chapter 14: Programming and Languages.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
MANAGEMENT INFORMATION SYSTEM
PROGRAMMING: What’s It All About?
Introduction to Algorithms
Learning outcomes 5 Developing Code – Using Flowcharts
ICS 3UI - Introduction to Computer Science
Programming and Languages
Programming Languages
CSCI-235 Micro-Computer Applications
Chapter 2- Visual Basic Schneider
System Design.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Chapter 14: Programming and Languages
Lecture 2 Introduction to Programming
Programming Languages
FORMAL SYSTEM DEVELOPMENT METHODOLOGIES
Introduction to Computer Programming
Algorithms, Part 2 of 3 Topics Problem Solving Examples Pseudocode
Algorithm and Ambiguity
Understand the Programming Process
Unit# 9: Computer Program Development
Problem Solving Techniques
Chapter 13: Systems Analysis and Design
Chapter 2- Visual Basic Schneider
Design and Implementation
Chapter 1 Introduction(1.1)
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 2- Visual Basic Schneider
Understand the Programming Process
PROGRAMMING AND LANGUAGES
Algorithm and Ambiguity
Programming and Languages
Flowcharting & Algorithms
Introduction to Algorithms
Lecture 7 Algorithm Design & Implementation. All problems can be solved by employing any one of the following building blocks or their combinations 1.
ICT Gaming Lesson 2.
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Basic Concepts of Algorithm
Programming Logic and Design Eighth Edition
Presentation transcript:

Programming & languages Ishik University Faculty of Science Dep. of Information Technology By: Raz Dara Mohammad Amin Programming & languages

Introduction Poorly designed software has destroyed companies in the blink of an eye. From stock purchase to pacemakers, our lives are increasingly dependent on digital devices and the programs that run them. In the future, robots with sophisticated artificial intelligence will handle everyday chores and you will program these robots using conversational English instruction. This lecture covers the things you need to know to be prepared for this ever-changing digital world, including: The software development life cycle—understand the steps of software development to be prepared to assist or manage software development projects. Programming languages—understand the differences between assembly, procedural, and natural languages to choose the best language for your needs.

What Is a Program? To see how programming works, think about what a program is. A program is a list of instructions for the computer to follow to accomplish the task of processing data into information. The instructions are made up of statements used in a programming language, such as C++, Java, or Visual Basic. Many programming languages and different types of computers exist, but the important first step is : need to have the solution.

What Is a Programming? A program is a list of instructions for the computer to follow to process data. Programming, also known as software development, typically follows a six- step process known as the software development life cycle (SDLC).

The six steps are as follows: Program specification: The program’s objectives, outputs, inputs, and processing requirements are determined. Program design: A solution is created using programming techniques such as top down program design, pseudo code, flowcharts, and logic structures. Program code: The program is written or coded using a programming language. Program test: The program is tested or debugged by looking for syntax and logic errors. Program documentation: Documentation is an ongoing process throughout the programming process. This phase focuses on formalizing the written description and processes used in the program.

Program maintenance: Completed programs are periodically reviewed to evaluate their accuracy, efficiency, standardization, and ease of use. Changes are made to the program’s code as needed. Programmers use this six-step procedure. In a recent survey by Money magazine, software engineers were ranked near the top of over 100 widely held jobs based on salary, prestige, and security. You may well find yourself working directly with a programmer or indirectly through a systems analyst. Or you may actually do the programming for a system that you develop. Whatever the case, it’s important that you understand the six-step programming procedure.

Step 1: Program Specification It requires that the programmer—or you, the end user, if you are following this procedure— specify five items: (1) the program’s objectives. (2) the desired output. (3) the input data required. (4) the processing requirements. (5) the documentation.

The program’s objectives You solve all kinds of problems every day. A problem might be deciding how to go to school or work or which homework or report to do first. Thus, every day you determine your objectives—the problems you are trying to solve. Programming is the same. You need to make a clear statement of the problem you are trying to solve. An example would be “I want a time-and-billing system to record the time I spend on different jobs for different clients of Advantage Advertising.”

Desired Output It is best always to specify outputs before inputs. You need to list what you want to get out of the computer system. Then you should determine what will go into it. The best way to do this is to draw a picture. You—the end user, not the programmer—should sketch or write how you want the output to look when it’s done. It might be printed out or displayed on the monitor. For example, if you want a time-and-billing report, you might write or draw something. Another form of output from the program might be bills to clients.

Input Data Once you know the output you want, you can determine the input data and the source of this data. For example, for a time-and-billing report, you can specify that one source of data to be processed should be time cards. These are usually logs or statements of hours worked submitted either electronically or on paper forms. Note that military time is used. For example, instead of writing “5:45 p.m.,” people would write “17:45.”

Step 2: Program Design After program specification, you begin program design. Here you plan a solution, preferably using structured programming techniques. These techniques consist of the following: (1) Top down program design (2) Pseudo code (3) flowcharts, (4) logic structures.

Top-Down Program Design First determine the outputs and inputs for the program. Then use top-down program design to identify the program’s processing steps. Such steps are called program modules (or just modules). Each module is made up of logically related program statements.

Pseudo code : is an outline of the logic of the program you will write. It is like doing a summary of the program before it is written. shows the pseudo code you might write for one module in the time-and- billing program. This shows the reasoning behind determining hours—including overtime hours—worked for different jobs for one client, Client A. Again, note this expresses the logic of what you want the program to do.

Flowcharts We mentioned system flowcharts in the previous chapter. Here we are concerned with program flowcharts. These graphically present the detailed sequence of steps needed to solve a programming problem symbols. This flowchart expresses all the logic for just one module—“Compute time on Client A jobs”—in the top-down program design.

Logic Structures: How do you link the various parts of the flowchart? The best way is a combination of three logic structures called sequential, selection, and repetition. Using these arrangements enables you to write structured programs, which take much of the guesswork out of programming. Let us look at the logic structures. In the sequential structure, one program statement follows another. Consider, for example, the “compute time” flowchart. For example Add regular hours to total regular hours and Add overtime hours to total overtime hours form a sequential structure. They logically follow each other. There is no question of “yes” or “no,” or a decision suggesting other consequences.

The selection structure occurs when a decision must be made The selection structure occurs when a decision must be made. The outcome of the decision determines which of two paths to follow. This structure is also known as an IF-THEN-ELSE structure because that is how you can formulate the decision.

The repetition or loop structure describes a process that may be repeated as long as a certain condition remains true. The structure is called a “loop” or “iteration” because the program loops around (iterates or repeats) again and again. The last thing to do before leaving the program design step is to document the logic of the design. This report typically includes pseudocode, flowcharts, and logic structures. Now you are ready for the next step, program code.

Step 3: Program Code Writing the program is called coding. Here you use the logic you developed in the program design step to actually write the program. This is the “program code” that instructs the computer what to do. Coding is what many people think of when they think of programming. As we’ve pointed out, however, it is only one of the six steps in the programming process.

The Good Program What are the qualities of a good program? Above all, it should be reliable— that is, it should work under most conditions and produce correct output. It should catch obvious and common input errors. It also should be well documented and understandable by programmers other than the person who wrote it. After all, someone may need to make changes in the program in the future. One of the best ways to code effective programs is to write so-called structured programs, using the logic structures described in Step 2: Program Design.

Coding: After the program logic has been formulated, the next step is to code, or write the program using the appropriate computer language. A programming language uses a collection of symbols, words, and phrases that instruct a computer to perform specific operations. Programming languages process data and information for a wide variety of different types of applications. Once the program has been coded, the next step is testing, or debugging, the program.

Thank You