DOC PREVIEW
RU CS 208 - Software Programming

This preview shows page 1-2-3-4-5-6 out of 17 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS208 Software ProgrammingIntroductionSlide 3LanguagesSlide 5Programming Language Capability RequirementsExample LanguagesProgram DevelopmentProgramsHigh-Level Language ProgrammingTypes of CodeSlide 12Creating Computer ProgramsStructured ProgrammingStructured Programming ConceptsStructured Programming Concepts (continued)Benefits of Structured Programming01/14/19 1CS208 Software Programming2IntroductionSoftwareInstructions that tell the computer what to do (ie. a program)Instructions are written in a programming language3Language LevelsEach type of CPU has its own specific machine languageOther language levels were created to make it easier for a human being to write programsmachine languageassembly languagehigh-level language4LanguagesMachine LanguageZeros and OnesBit representations are specific to a particular hardware architectureAssembly LanguagesUse mnemonics for operations and sometimes also for memory locationsEach assembly language is specific to a particular hardware architectureTranslated by an Assembler5LanguagesHigh Level Languages –Use English-like statements to instruct the computer what to doAre more portable (will run on different kinds of hardware)Are easier for humans to understand and program withTranslated by a Compiler6Programming Language Capability RequirementsRepresentation & Storage (of both the Data and the program Instructions)Data Processing (Interprets the program instructions and carries out the operations defined by these instructions on the Data)Data Input and Data OutputInput Data - data that is provided (is not computed) to the program as it runsOutput Data - data that the program ultimately produces (output data = solution of the computational problem)7Example LanguagesHigh Level LanguagesFORTRAN - scientific/engineering, mathCOBOL - businessBASIC - education and PCsPascal - education C/C++ - application developmentJava - application development8Program DevelopmentProgram development consists of:Discovering the underlying algorithmRepresenting that algorithm as a program using a programming language9ProgramsWhat is a program?A collection of statementsWritten in a programming languageSpecify the steps taken to solve a problemEach programming language has grammar rules that specify:How the statements are formedHow the statements are combined10High-Level Language ProgrammingProgramming requires:A programming language (e.g. C++) to express your ideasA set of tools to edit and debug your codeA compiler to translate your programs to machine code A machine to run the executable code on11Types of CodeSource code (source file)Typed into the editor by the programmer using a programming languageObject Code (object file)Translated from the source code by the compilerExecutable CodeCreated by the linker - links the object code and any necessary library object code files together12Program DevelopmentHigh-Level LanguageProgramDevelopmentComputational ProblemAn Algorithm Source code Program in a High-Level Language (e.g. C++)CompilerA machine LanguageProgram developencodeSourceCodeLinkerObjectCode13Creating Computer ProgramsAnalyze the problemPlan an algorithmHand check the algorithmCode the algorithm (or write program)Hand check (trace through) the programEvaluate and modify program as necessary14Structured ProgrammingStructured Programming is a technique used to create well-formed programsUses top-down design with stepwise refinementLarger pieces of code are broken into shorter pieces of code that encompass a single taskTask are repeatedly broken down into smaller tasks, until they are small enough to be understood easily15Structured Programming ConceptsFinal program is created via top-down design. Main code starts with empty modules, and is slowly refined to lowest level Program is subdivided into modules (one logical task, generally no more than one page long)Keeps programmer from being overwhelmed by the size of the jobAllows easy division of work (modules assigned to different programmers)16Structured Programming Concepts (continued) Each module is organized into recognizable paragraphs, using indentation to show nesting and subordinate clauses.Code structures should have only one entry point and one point of exit (no GOTO).Embedded comments describe the function of each data item and purpose of each module.Straightforward, easily readable code is preferred over slightly more efficient, but obtuse, code.17Benefits of Structured ProgrammingMore readableEasier to maintainMore flexibleMore likely to be correct on first runEasier to "prove" by systematic program


View Full Document

RU CS 208 - Software Programming

Download Software Programming
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Software Programming and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Software Programming 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?