PROGRAMMING AND LANGUAGES

Slides:



Advertisements
Similar presentations
CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
Advertisements

Computers Are Your Future
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Professor Michael J. Losacco CIS 1150 – Introduction to Computer Information Systems Programming and Languages Chapter 13.
Programming Creating programs that run on your PC
McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Programming and Languages.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Program Development and Programming Languages
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Programming and Languages Chapter Competencies (Page 1 of 2) Describe the six steps of programming Discuss design tools including top-down design,
1 CIS 100 Winter 2005 Week 10 Lecture Dr. David Gadish.
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
Your Interactive Guide to the Digital World Discovering Computers 2012.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Program development & programming languages Chapter 13.
Programming Languages: Telling the Computers What to Do Chapter 16.
CC111 Lec#5: Program Development 1 Program Development and Programming Languages Lecture 4 Reference :Understanding Computers Chapter 13.
Higher Grade Computing Studies 2. Languages and Environments Higher Computing Software Development S. McCrossan 1 Classification of Languages 1. Procedural.
PROGRAMMING LANGUAGES Prof. Lani Cantonjos. PROGRAM - set of step-by-step instructions that tells or directs the computer what to do. PROGRAMMING LANGUAGE.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
CMPE13Cyrus Bazeghi 1 Programming Languages Telling computers what to do.
© 2001 Business & Information Systems 2/e1 Chapter 8 Personal Productivity and Problem Solving.
Lead Black Slide Powered by DeSiaMore1. 2 Chapter 8 Personal Productivity and Problem Solving.
Computing Essentials 2014 Programming and Languages © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
Programming and Languages
Chapter One An Introduction to Programming and Visual Basic.
Chapter 14 Programming and Languages McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved.
Copyright © 2012 The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Chapter 14: Programming and Languages.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming C++
PROGRAMMING. Computer Programs  A series of instructions to the computer  pre-written/packaged/off-the-shelf, or  custom made  There are 6 steps to.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
Game programming 1.
Systems Analysis and Design
Component 1.6.
ICS 3UI - Introduction to Computer Science
Programming and Languages
Programming Languages
CSCI-235 Micro-Computer Applications
Key Ideas from day 1 slides
Chapter 14: Programming and Languages
A451 Theory – 7 Programming 7A, B - Algorithms.
Programming Languages
Application Development Theory
Algorithm and Ambiguity
Understand the Programming Process
Assembler, Compiler, Interpreter
Computer Programming.
Programming & languages
Chapter 14: Programming and Languages
Chapter 13: Systems Analysis and Design
Chapter 2- Visual Basic Schneider
Chapter 1 Introduction(1.1)
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 2- Visual Basic Schneider
Chapter One: An Introduction to Programming and Visual Basic
Understand the Programming Process
Assembler, Compiler, Interpreter
Programming and Languages
Chapter 11 Describing Process Specifications and Structured Decisions
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Programming Logic and Design Eighth Edition
Presentation transcript:

PROGRAMMING AND LANGUAGES 14 CHAPTER PROGRAMMING AND LANGUAGES This chapter discusses the steps in the programming process (similar to systems analysis and design) and programming languages available – from machine to “natural” language Programming is part of Step 4 where you actually develop (or write) a new system Computer competent users need to be aware of the six steps of programming: Program specification Program design Program code Program test Program documentation Program maintenance

Competencies (Page 1 of 2) Describe the six steps of programming Discuss design tools including top-down design, pseudocode, flowcharts, and logic structures Describe program testing and the tools for finding and removing errors Page 396

Competencies (Page 2 of 2) Describe CASE tools and object-oriented software development Explain the five generations of programming languages Page 396

Programs and Programming What is a Program? A problem-solving procedure A list of instructions Prewritten Custom-written Application software System software A program is a list of instructions – for computers and computer systems, these instructions can be prewritten (off-the-shelf) programs that are easy to install but are sometimes rigid in what can be accomplished When one of these prewritten programs doesn’t quite fit your needs (based on your systems analysis), you can have the list of instructions written by a programmer Consider that this can be expensive Page 398

What is Programming? Programming is software development Six step procedure Program specification Program design Program code Program test Program documentation Program maintenance When writing a program from scratch, the programmer generally follows these six steps to get to the end product that will solve your computing needs. The specifications are the objectives, the output, the input, and the processing requirements that are determined by you and the programmer. The design is the creation of the solution using a variety of techniques (generally including pseudocode, flowcharts, and logic structures). The program code is written Testing code or debugging to get rid of syntax and/or logic errors. The program is documented as it is written. Sometimes this is done within the code itself (as with some Web languages where you can insert explanations without this information showing on the page); other times the documentation is done in a “manual” that will help others see where you have been/gone/or how you got where you did with your coding. Program maintenance – As with system analysis and design, an on-going part of every software development is the maintenance – checking to be sure the program is doing what it is supposed to do and that the objectives have not changed. In organizations, computer professionals known as software engineers or programmers use this six-step procedure Page 398

Step 1 Program Specifications Also called program definition or program analysis – requires that five items are specified--1. the program’s objectives, 2. the desired output, 3. the input data required, 4. the processing requirements, 5. the documentation BE SURE TO DOCUMENT WHAT YOU ARE DOING, WHY, HOW, AND WHAT YOU DID TO GET TO WHERE YOU ARE AT THIS POINT! The next slide provides a look at specific planning Page 399

Input and Output Plans End user sketches of desired output to help determine needed input to meet objective Have program objectives What problems are you trying to solve? Specify your inputs before your outputs Have a list of what you want to get out of the system The end-user (not the programmer) should sketch what is needed Input data Determine the source of the data What are the processing requirements? Tasks to move input to output Document program specifications This is an essential step and is often left out Page 400

Step 2 Program Design Plan a solution Use structured programming techniques Top-down program design Pseudocode Flowcharts Logic structures Documentation In this step, the solution is created using structured program techniques. **Click on each link to display an example of each of the programming techniques Use your flowcharts and your pseudocode as part of your documentation – to help others understand your logic as most people don’t follow the same path to get to the end. Page 401

Step 3 Program Code Writing the program or coding The good program Reliable Well documented Understandable to other programmers Structured programs best method Use the most appropriate computer language This is the easiest part where you actually write or key into the computer the instructions the program is to follow Just be sure that your code is reliable – works under most conditions! Formatting or presentation language uses symbols, words, and phrases that instruct a computer how to display information. Programming language uses a collection of symbols, words, and phrases that instruct a computer to perform specific operations. Use the most appropriate language (C++, Visual Basic, Java) for the situation for which the code will be used. If you’re writing a program for Internet use, probably Visual Basic or Java or one of the other “newer” languages (or scripts) Again – document what you are doing and why so that when you review later or someone else needs access to your code, you will know why you did what you did the way you did it! Page 406

Identified Syntax error Step 4 Program Test Debugging Testing Eliminating errors Syntax errors Logic errors Testing processing Now it’s written, so let’s test your program to be sure it does what you intended. This procedure sometimes is called “Debugging”—testing a program and correcting syntax and logic errors. Syntax errors – violation of the programming language rules Logic errors – result of omitted programming procedure or incorrect calculation Testing process involves one or more of several methods: Desk checking – printout of program reviewed line by line Manual testing with sample data - correct and incorrect data manually entered, results evaluated Attempt at translation – written program goes through translator program on the computer, must be syntax error free Testing sample data on the computer – tests for logic errors Beta testing: testing by a select group of potential users; users provide feedback Identified Syntax error Page 410

Step 5 Documentation Written descriptions and procedures about a program Important for people who will use the program Users Operators Programmers “Documenting” means writing a description of the purpose and process of the program. Not an afterthought at the end of the programming process, but prepared throughout the programming steps Documentation very important to Users - needing to know how to use the software; hardest part is to get documentation in “language” most lay people can understand. If you build something, you know what to expect; if someone else builds it, you may not understand why they did what they did. Operators - for dealing effectively with error codes and other problems Programmers - for updates and modifications; even programmers tend to forget how they came up with the “logic” of the program; documentation helps reconstruct the thought process and reasoning behind the code sequence. Page 410

Step 6 Program Maintenance 75% of total lifetime cost Error-free operations Effective program Two categories Operations Changing needs As with systems analysis, the program maintenance takes up the majority of the programmer’s time This step is critical – to maintain the program and to be sure it is accomplishing what it was intended to accomplish Operations – Use this part of the process to locate and correct any errors missed previously or that have developed over the life of the program Changing needs – Make changes when and where necessary! Don’t wait until the system or program crashes—be diligent and stay on top of any potential errors. This activity is so commonplace that a special job title, maintenance programmer exists. Page 412

CASE Tools Computer-aided software engineering (CASE) Automate development process Designing Coding Testing activities Two resources that help software development include CASE tools and object-oriented software development CASE tools help automate the process of designing, coding and testing activities; helps make programmers’ work easier, faster, and more reliable Page 413

Object-Oriented Software Development Focuses less on procedures, more on relationship between objects OOP: Object-oriented programming Object contains both the data and the processing operations Traditional systems development is careful, step-by-step approach focusing on procedures to complete certain objective Object-oriented software development – process by which program is organized into objects OOP uses modules called objects that are reusable, self-contained components. Presume that certain functions are the same, so instructions are used in variety of software. C++ one of most widely used OOP languages Page 414

Generations of Programming Languages (Page 1 of 2) Occurring in “generations” or “levels” Levels-Machine languages to natural languages There are five generations : Lower level closer to machine language Higher level closer to human-like language Writing code means programmer has to learn a language As we learned earlier, the computer only understands 0s and 1s. Therefore, the most basic of languages is called machine languages where all the instructions are written in a series of 0s and 1s Needless to say, this makes understanding the instructions very hard for the average person There is also “natural” languages that more closely simulate the way people actually talk and sort through problems As computers have gone through generations, so have languages Next slide displays all the levels of programming languages Page 414

Generations of Languages (Page 2 of 2) 1st -- Machine languages 2nd -- Assembly languages 3rd -- High level procedural languages (3GL) 4th -- Problem-Oriented languages (4GL) 5th -- Natural Languages & Visual programming languages(5GL) Machine languages – data represented in 1’s and 0’s; hard to understand; vary according to make of computer! Assembly languages – abbreviations and mnemonics replace the 0’s and 1’s; easier than machine, but still hard to understand for the common person. Advantage over machine language is that Assembly language is portable from one machine to another. High level procedural languages – third generation. More closely resembles the way we talk, but still requires considerable training to be able to use and understand. When program written in procedural language, it must be translated into machine language using: Compiler – converts high-level language (called source code) into machine language (called object code); once done execution faster -- or Interpreter – converts to machine language just before processing, one statement at a time; easier to develop with Problem-oriented languages are used for solving specific problems. They generally require little special training on the part of the user. Query languages - easy commands to retrieve information from databases Application generators – preprogrammed modules written to perform a specific task Natural languages are still being developed; these are designed to replicate human languages. Hope is that in near future these languages can be developed to the point where they will enable a computer to learn – to remember and improve upon that memory 5GL has been expanded to include visual programming languages that provide intuitive icons, menus, and drawing tools Example is Microsoft’s Visual Basic Page 415

A Look to the Future MI-Tech Synapse Solutions has created a system called MI-tech Understands word order and meaning Computer translates "wish list" into machine language Synapse Solutions has created a system called MI-Tech Has an understanding of word order and meaning in English Page 418

Discussion Questions (Page 1 of 2) Identify and discuss each of the six steps of programming. Describe CASE tools and OOP. How does CASE assist programmers? What is meant by “generation” in reference to programming languages? What is the difference between low-level and high-level languages? Have students turn to the end of Chapter 14 in their textbooks to view the same “Open-Ended” questions/statements Page 427

Discussion Questions (Page 2 of 2) What is the difference between a compiler and an interpreter? What are logic structures? Describe the differences between the three logic types. Have students turn to the end of Chapter 14 in their textbooks to view the same “Open-Ended” questions/statements Page 427