Computer Concepts 2013 Chapter 12 Computer Programming.

Slides:



Advertisements
Similar presentations
Chapter 12 Computer Programming
Advertisements

Chapter 12 Computer Programming.
Computers Are Your Future
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Chapter 1: Introduction
Programming Creating programs that run on your PC
Computers Are Your Future © 2006 Prentice Hall, Inc.
Computers: Tools for an Information Age
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Modules, Hierarchy Charts, and Documentation
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 2: Developing a Program Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved.
Chapter 1 Program Design
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Computer Programming.
Computer Programming How Can You Create Your Own Software? Chapter 13.
11 Computer Programming Section A Programming Basics CHAPTER
C++ Crash Course Class 1 What is programming?. What’s this course about? Goal: Be able to design, write and run simple programs in C++ on a UNIX machine.
Your Interactive Guide to the Digital World Discovering Computers 2012.
Computer Programming and Database Handout
Chapter 1 Introduction to Computers and C++ Programming.
© Paradigm Publishing Inc Chapter 12 Programming Concepts and Languages.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
1 Technology in Action Chapter 7 Behind the Scenes: Software Programming.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Computers Are Your Future Tenth Edition Chapter 11: Programming Languages & Program Development Copyright © 2009 Pearson Education, Inc. Publishing as.
Program development & programming languages Chapter 13.
Programming Languages: Telling the Computers What to Do Chapter 16.
A First Program Using C#
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Understanding Computers Ch. 131 Chapter 13 Program Development and Programming Languages.
信息处理技术.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Computer Concepts 2014 Chapter 12 Computer Programming.
1 Chapter 13 Understanding Computers, 11 th Edition 13 Program Development and Programming Languages TODAY AND TOMORROW 11 th Edition CHAPTER.
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
Chapter 12 Computer Programming. Chapter Contents Chapter 12: Computer Programming 2  Section A: Programming Basics  Section B: Procedural Programming.
Chapter 12 Computer Programming. 12 Chapter 12: Computer Programming 2 Chapter Contents  Section A: Programming Basics  Section B: Procedural Programming.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
Computer Concepts 2014 Chapter 12 Computer Programming.
Unit 11 Programming.
Principles of Information Systems, Sixth Edition Software: Systems and Application Software Chapter 4.
Principles of Information Systems, Sixth Edition Software: Systems and Application Software Chapter 4.
Computer Concepts 2013 Chapter 12 Computer Programming.
Computer Programming CONTENTS Introduction to Operating Systems Introduction to programming languages Introduction to perl programming language Programming.
Chapter 12: Computer Programming 1 Computer Programming Chapter 12.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Introduction to Programming Languages © 2005 Prentice Hall, Inc. CXC IT Unit 2: Intro. to Programming.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Chapter 1: Introduction to Computers and Programming.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 1 An Introduction to Visual Basic.NET and Program Design.
Java Programming Fifth Edition Chapter 1 Creating Your First Java Classes.
Software Engineering Algorithms, Compilers, & Lifecycle.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Unit 11 Programming.
Chapter 12 Computer Programming.
CSCI-235 Micro-Computer Applications
Developing Applications
Computer Programming.
Chapter 12: Computer Programming
Chapter 1 Introduction(1.1)
Chapter 2- Visual Basic Schneider
Principles of Programming Languages
Presentation transcript:

Computer Concepts 2013 Chapter 12 Computer Programming

12 Computer Programming and Software Engineering Chapter 12: Computer Programming 2

12 Programming Languages and Paradigms  Programming languages are made up of keywords and grammar rules designed for creating computer instructions  Keywords can be combined with specific parameters  Low-level languages typically include commands specific to a particular CPU or microprocessor family  High-level languages use command words and grammar based on human languages Chapter 12: Computer Programming 3

12 Programming Languages and Paradigms  First-generation languages  Machine language  Second-generation languages  Assembly language  Third-generation languages  Easy-to-remember command words Chapter 12: Computer Programming 4

12 Programming Languages and Paradigms  Fourth-generation languages  More closely resembles human language  Fifth-generation languages  Based on a declarative programming paradigm  The programming paradigm refers to a way of conceptualizing and structuring the tasks a computer performs Chapter 12: Computer Programming 5

12 Programming Languages and Paradigms Chapter 12: Computer Programming 6

12 Program Planning  The problem statement defines certain elements that must be manipulated to achieve a result or goal  You accept assumptions as true to proceed with program planning  Known information helps the computer to solve a problem  Variables vs. constants Chapter 12: Computer Programming 7

12 Program Planning  Problem statement: Assuming that there are two pizzas to compare, that both pizzas contain the same toppings, and that the pizzas could be round or square, and given the prices, shapes, and sizes of the two pizzas, the computer will print a message indicating which pizza has the lower price per square inch Chapter 12: Computer Programming 8

12 Program Coding Chapter 12: Computer Programming 9

12 Program Coding  A VDE (visual development environment) provides programmers with tools to build substantial sections of a program  Form design grid  Control  Properties  Event  Event-handling code Chapter 12: Computer Programming 10

12 Program Coding Chapter 12: Computer Programming 11 CLICK TO START

12 Program Coding Chapter 12: Computer Programming 12

Program Testing and Documentation  A computer program must be tested to ensure that it works correctly  Program errors include:  Syntax errors  Runtime errors  Logic errors  A debugger can help a programmer read through lines of code and solve problems Chapter 12: Computer Programming 13

12 Program Testing and Documentation  Remarks or “comments” are a form of documentation that programmers insert into the program code Chapter 12: Computer Programming 14

12 Programming Tools  An SDK (software development kit) is a collection of language-specific programming tools that enables a programmer to develop applications for a specific computer platform  An IDE (integrated development environment) is a type of SDK that packages a set of development tools into a sleek programming application Chapter 12: Computer Programming 15

12 Programming Tools  A component is a prewritten module, typically designed to accomplish a specific task  An API is a set of application program or operating system functions that programmers can access from within the programs they create  C, Java, and C++ are the most popular programming languages  Microsoft’s XNA framework is a set of tools for creating Xbox 360 games  Objective-C is popular for creating apps for iPhones and iPads Chapter 12: Computer Programming 16

12 Algorithms Chapter 12: Computer Programming 17

12 Expressing an Algorithm  Structured English  Pseudocode Chapter 12: Computer Programming 18

12 Expressing an Algorithm  Flowchart Chapter 12: Computer Programming 19

12 Expressing an Algorithm  Perform a walkthrough to verify that your algorithm works Chapter 12: Computer Programming 20

12 Sequence, Selection, and Repetition Controls  Sequence control structure Chapter 12: Computer Programming 21 CLICK TO START

12 Sequence, Selection, and Repetition Controls  Subroutines, procedures, and functions are sections of code that are part of the program, but not included in the main sequential execution path Chapter 12: Computer Programming 22

12 Sequence, Selection, and Repetition Controls  Selection control structure Chapter 12: Computer Programming 23 CLICK TO START

12 Sequence, Selection, and Repetition Controls  Repetition control structure Chapter 12: Computer Programming 24 CLICK TO START

12 Procedural Languages and Applications  Popular procedural languages: COBOL, FORTH, APL, ALGOL, PL/1, Pascal, C, Ada, and BASIC  The procedural approach is best for problems that can be solved by following a step-by-step algorithm  Does not fit gracefully with certain types of problems  Produces programs that run quickly and use system resources efficiently Chapter 12: Computer Programming 25

12 Objects and Classes  An object represents an abstract or real-world entity  A class is a template for a group of objects with similar characteristics  A class attribute defines the characteristics of a set of objects  Public vs. private attributes Chapter 12: Computer Programming 26

12 Inheritance  Passing certain characteristics from one class to other classes  Class hierarchy  Superclass  Subclass Chapter 12: Computer Programming 27

12 Methods and Messages  A method is a segment of code that defines an action  Collect input, perform calculations, etc.  A method is activated by a message  Can be defined along with the class they affect  Polymorphism refers to the ability to redefine a method in a subclass  Helps simplify program code Chapter 12: Computer Programming 28

12 Object-Oriented Program Structure Chapter 12: Computer Programming 29

12 Object-Oriented Program Structure Chapter 12: Computer Programming 30

12 Object-Oriented Program Structure Chapter 12: Computer Programming31 CLICK TO START

12 Black Hat Exploits  Viruses, worms, bots, malicious Web scripts, and other exploits plague computer users  Black-hat exploits  A buffer overflow (also called a buffer overrun) is a condition in which data in memory exceeds its expected boundaries and flows into memory areas intended for use by other data Chapter 12: Computer Programming 32

12 Black Hat Exploits  Verbose error messages can also present attackers with information about the directory location of programs or files, the structure of a database, or the layout of the program in memory Chapter 12: Computer Programming 33

12 Secure Software Development  Most software security problems can be traced back to defects that programmers unintentionally introduce in software during design and development  Formal methods help programmers apply rigorous logical and mathematical models to software design, coding, testing, and verification  Threat modeling (risk analysis) Chapter 12: Computer Programming 34

12 Secure Software Development Chapter 12: Computer Programming 35

12 Secure Software Development  An attack tree is a hierarchical diagram of potential attacks against a system Chapter 12: Computer Programming 36

12 Secure Software Development  Defensive programming (also referred to as secure programming) is an approach to software development in which programmers anticipate what might go wrong as their programs run and take steps to smoothly handle those situations  Source code walkthroughs  Simplification  Filtering input Chapter 12: Computer Programming 37

12 Secure Software Development  Signed code is a software program that identifies its source and carries a digital certificate attesting to its authenticity Chapter 12: Computer Programming 38

12 Mitigation  Despite defensive programming and other tactics to produce secure software, some defects inevitably remain undiscovered in products that end up in the hands of consumers  When bugs are discovered, the programmer’s remaining line of defense is to produce a bug fix or patch Chapter 12: Computer Programming 39

Computer Concepts 2013 Chapter 12 Complete