1 / 44

Computer Programming

Computer Programming. PHILLIP ANDERSON. BRANDON SCHAFFER BRIAN FERLINO EUGENE PETERSON JARED WOLF JULAND KILPATRICK. It is problem solving. It is the writing of the human problem solving process. It is what makes computers useful. Computer Programming.

meg
Télécharger la présentation

Computer Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Programming PHILLIP ANDERSON BRANDON SCHAFFER BRIAN FERLINO EUGENE PETERSON JARED WOLF JULAND KILPATRICK

  2. It is problem solving. • It is the writing of the human problem solving process. • It is what makes computers useful. Computer Programming

  3. It is similar to writing a how-to guide. • Tells computers how to calculate something, output something, or organize something. • Without Computer Programming, computers would be useless. Computer Programming

  4. By Phillip Anderson Low Level Language

  5. Machine Code • Computers “speak” in ones and zeros. • Machine Code is the Low Level Language that computers directly use. • It is written in the ones and zeros that computers “understand.” Ex: 0 or 1 = bit 01011011 = Byte Ex: 0010000000101100 has a specific meaning to specific computer hardware. Low Level Language Phillip Anderson

  6. Assembly Language • Assembly Language substitutes ones and zeros with symbols and abbreviations. • Makes programming easier. • When finished, Assembly Language is converted to Machine Code (ones and zeros) for the computer to use. Ex: MOV ES, AH = Moves/copies the value of AH to ES. Low Level Language Phillip Anderson

  7. Ask Question in Different Syntax Assembly Language Converter (Compiler) Your Syntax Machine Code Understanding “Understanding” Your Answer Output Similar too… Low Level Language PhillipAnderson

  8. Advantages/Disadvantages • Advantages of Low Level Language • Very efficient • Very versatile • Disadvantages of Low Level Languages • Time consuming, meticulous work • Error prone Low Level Language Phillip Anderson

  9. By Brian Ferlino High Level Language

  10. High Level Language High Level Language Brian Ferlino The language is used to solve problems. • It made problem solution easier and less error prone. • Problem oriented language are Pascal, Cobol, and Fortran. • Object oriented language are Java, and C & C++

  11. Pascal High Level Language Brian Ferlino Invented by Professor Niklaus Wirth of Zurich. It usually know as Basic, the introductory language for specialist Computer Science students. Its more evolved than the earlier language.

  12. Fortran High Level Language Brian Ferlino Developed by IBM workers in the late 1950’s Used for programs solving scientific and mathematical problems Fortran 66 and 77 The success of Fortran

  13. Cobol High Level Language Brian Ferlino Common Business Oriented Language It was able to handle large amounts of data. CODASLY improved the language and then it was called COBOL 68. How it changed over the years.

  14. Structured Programming By Jared Wolf

  15. What is Structured Programming? (Also known as Modular Programming) • It’s a logical structure of a program that makes writing code more efficient and simpler to modify. • Structured programming is easier to fix/ modify as well as work faster when trying to solve a problem. • An advantage of using structured design is the capability to reduce the use of the GOTO statement. (Although some structured program languages do support the GOTO statement.) Structured Programming Jared Wolf

  16. 3 Building Blocks of the Composition of Structured Programming • Concatenation • Creating fundamental statements that follow a logical sequence in order to be executed. • Each statement or command must logically flow into the next without causing unwanted activities or executions. • Concatenation is also a process of combining two character strings, or setting them equal to one another. Structured Programming Jared Wolf

  17. 3 Building Blocks of the Composition of Structured Programming (Cont.) • Selection • A control structure that permits a variety of statements to execute, based on the condition of the program. • Selection statements contain keywords that assist to categorize the order as a logical executable. • Some examples of selection declarations: • “if” statements • “if-else” statements • “then” statements • “endif” statements • “switch” statements Structured Programming Jared Wolf

  18. 3 Building Blocks of the Composition of Structured Programming (Cont.) • 3. Repetition • A statement is performed and remains active until the program • reaches a point where another operation is applied. • In repetition, an action is used called a ‘loop”. • A loop is a continuous instruction implemented until a • certain condition is met. • Examples of repetition keywords are: • “repeat” statement • “for” statement • “do” statement • “while” statement • “do-while statement • “do-until” statement Structured Programming Jared Wolf

  19. Additional Structured Programming Information • Most types of structured programs begin with a distinct entry, but • allow more than one outlet for the program. • Certain types of structured programming will permit components • to interact with one another in the overall structure of the program. • Each module in structured programming characterizes • a different processing task. Structured Programming Jared Wolf

  20. Object-Oriented Programming By Brandon Schaffer

  21. Why OOP? • Early Programming techniques required code and data to be kept separate from each other. • Problems arose when the code or data was inevitably changed. • Because of this programmers decided to place the code and data in a single location called an object. Object-Oriented Programming (OOP) Brandon Schaffer

  22. The History of OOP • Object-oriented programming began with Simula, a programming language developed from 1962 to 1967 by Ole-Johan Dahl and Kristen Nygaard at the Norwegian Computing Center in Oslo, Norway. • In the early 1970s Alan Kay developed Smalltalk, an OOP language that took advantage of graphic user interfaces and led to the development of Mac and Windows operating systems. • The most popular OOP language is C++, developed by Bjarne Stroustrup. Object-Oriented Programming(OOP) Brandon Schaffer

  23. How OOP Works • Non-object-oriented computer language a = 1; b = 2; c = a + b; • Object-Oriented computer language a := 1. b := 2. c := a + b. Object-Oriented Programming(OOP) Brandon Schaffer

  24. How OOP Works • Non-object-oriented computer language a = "John Jones"; b = "Suzy Smith"; c = a + b; • Object-oriented computer language a = "John Jones"; b = "Suzy Smith"; c = 'John Jones, Suzy Smith' Object-Oriented Programming(OOP) Brandon Schaffer

  25. Inheritance • Inheritance is when programmers add a new object to an existing object. • This allows programmers to use existing code and saves time and money. • Another benefit of OOP is programmers know the existing code works, leading to fewer errors in the new program. Object-Oriented Programming(OOP) Brandon Schaffer

  26. Abstraction By Juland Kilpatrick

  27. Definition Abstraction Juland Kilpatrick • Abstraction- the idea of simplifying an idea by subtracting or condensing problems to fit the idea • Push- adding new ideas • Pop – taking away ideas • Computer Science- concepts and methods dealt in digital form

  28. Abstraction levels Abstraction Juland Kilpatrick • High level of abstraction • Global • Low level of abstraction • Local

  29. High and Low level of abstraction Abstraction Juland Kilpatrick • High Level • Operating systems- updating the system keeps the operating system running smoothly • Windows • Mac • Low Level • Applications for operating systems • Internet explorer • Microsoft Office

  30. Advantages/ Disadvantages Abstraction Juland Kilpatrick • Advantages of Abstraction • Efficient • Simplifies the main idea • Disadvantages of Abstraction • Time consuming • Possible human error

  31. Subroutines and Parameters By Eugene Peterson

  32. Subroutines Subroutines and Parameters Eugene Peterson Def- A portion of code or set of instructions that perform a specific task for the computer, also referred to as a “system call”. A subroutine is labeled by the number of its first line and is executed when a GOSUB command is reached. The RETURN command ends the subroutine and tells the computer to return to its main program.

  33. Functions Subroutines and Parameters Eugene Peterson Def- An assigned task or activity that once created, it can be used several times over without having to recreate the code line or formula. Functions are activated by placing a “function call” in the program, once called the function operation is performed it returns to computer instructions following the function. Functions also require a place holder in the program in order to get a return result, a precise return command is needed as well for each function statement. Because of this an isolated variable is also needed in order to hold a temporary return result .

  34. Procedures Subroutines and Parameters Eugene Peterson Def- A specific list of programs or functions that need to be executed. Commonly referred to as a subroutine or function. The computer mainframe uses “job control language” (JCL) to perform the program procedures. Procedures use a method of executing the same task at more than one location in the program while separating the details of its main logic from the program.

  35. Subroutine Interfaces Subroutines and Parameters Eugene Peterson • Def- A way of the computer communicating with any other entity by converting signals from one device into signals the receiving device needs, such as a scanner or human being. • Types of Subroutine interfaces: • Serial interface- used when data is sent over long distant locations, mostly through telephone lines. • Parallel interface- mostly used by means of a printer or disk drive because the computer and the printer/disk drive are not that far from each other. • Hardware interface- Sockets, plugs, cables, and the electric signals being sent through them. • Software interfaces (programming interfaces)- The codes or languages that programs use communicate with the hardware as well as other programs. • User interfaces – The keyboards, monitor, mouse, menus, these are all used for communication between the computer and the user.

  36. Parameters • Def- A variable which assumes the role of a parallel argument stated in a call to a subroutine. • Parameter types: • Value parameter • Call-by-value- A parameter that acts within the subroutines restrictions as a local copy of the argument. • While being copied by a subprogram which can eventually alter its copy without affecting the original. • Because of this a new storage location is created for the variable in the function statement, starting with the value you give in the initial function statement. • If you were to alter that value it will change, but will have no affect on the original function statement. Subroutines and Parameters Eugene Peterson

  37. Parameters (continued) Subroutines and Parameters Eugene Peterson Reference Parameter • Call-by-reference- An argument given by the user that can be affected by actions within the subroutine. • Reference parameters do not create a new storage location, unlike a value parameter, they instead represent the identical storage location as the variable given for the original method argument. • A variable must also be assigned before it can be declared a reference point. • A reference parameter is definitely assigned when using a method as well. • It is common to use reference parameters to return values, you use reference parameters when you need to change the value of an actual parameter variable in the call.

  38. Works Referenced McCluskey, Carolina. Interview. Penn State Lehigh Valley 18 Sept. 2008 Schneider, David. "Neatness Counts." American Scientist 95.3 (2007): 213-214. Research Library Core. ProQuest. 18 Sept. 2008 <http://www.proquest.com/>. Low Level Language Phillip Anderson

  39. Works Referenced "High level language." tiscali. 2008. Helicon. 17 Sept. 2008 <http://www.tiscali.co.uk/reference/dictionaries/computers/data/m0034339.html>. King, Peter. "High level language." 31 Aug. 1999. 17 Sept. 2008 <http://www.macs.hw.ac.uk/~pjbk/pathways/cpp1/node22.html>. High Level Language Brian Ferlino

  40. Works Referenced “Lesson 8: Structured Programming, Control Structures, If-Else Statements, Pseudo-code.” Student Outline. 1998 <www.mvhs.fuhsd.org/bob_vanhoy/pdfs/lesson08.pdf>. Stevens, W. P., Myers G. J., Constantine L. L. “Structured Design” General Considerations of Structured Design 2 (1974): 115-116 Tatum, Malcolm. “What is Structured Programming?” Conjecture Corporation. 13 Sept. 2008 <http://www.wisegeek.com/what-is-structured-programming.htm>. Structured Programming Jared Wolf

  41. Works Referenced “Object-Oriented Programming." Microsoft® Student 2008 [DVD]. Redmond, WA: Microsoft Corporation, 2007. “What is Object Oriented Programming.” Software Design Consultants. 15 Sept. 2008 <http://softwaredesign.com>. Object-Oriented Programming Brandon Schaffer

  42. Works Referenced Childs, Jeffery S. C++ Classes and Data Structures. Upper Saddle River, NJ: Person Education Inc. 43-46. Hazzan, Orit. "Abstraction in Computer Science & Software Engineering: A Pedagogical Perspective." Technion. 10 Dec. 2006. Israil Institution. 17 Sept. 2008 <http://edu.technion.ac.il/faculty/orith/homepage/frontiercolumns/orithazzan_systemdesigfrontier_column5.pdf>. Abstraction Juland Kilpatrick

  43. Works Referenced "Channel Web." 2008. ChannelWeb.com. 12 Sept. 2008 <http://www.crn.com/encyclopedia/defineterm.jhtml?term=function>. Computer Language Company, Inc. TechEncyclopedia. 1995-2008. Answers.com. 13 Sept. 2008 <http://www.answers.com/procedures>. Friedman, Jack P. Dictionary of Business Terms. Barron's Educational Series, Inc, August 1997 Joel G. Siegel, Jae K. Shim. "Accounting Handbook." Joel G. Siegel, Jae K. Shim. Accounting Handbook. Barron's Educational Series, 2000. 519. Skeet. "Value Parameters." 1999-2006. Developer Fusion. 14 Sept. 2008 <http://www.developerfusion.co.uk/show/4697/2/>. Skeet. "Reference Parameters." 1999-2006. Developer Fusion. 14 Sept. 2008 <http://www.developerfusion.co.uk/show/4697/3/>. “Subroutine." Dictionary of Business Terms. Barron's Educational Series, Inc, 2000. Answers.com. 15 Sept. 2008 <http://www.answers.com/topic/subroutine>. The Computer Language Company. "Interface." 1981-2008. Tech Web. 11 Sept. 2008 <http://www.techweb.com/encyclopedia/defineterm.jhtml?term=Interface>. Subroutines and Parameters Eugene Peterson

More Related