470 likes | 814 Views
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.
E N D
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
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
By Phillip Anderson Low Level Language
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
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
Ask Question in Different Syntax Assembly Language Converter (Compiler) Your Syntax Machine Code Understanding “Understanding” Your Answer Output Similar too… Low Level Language PhillipAnderson
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
By Brian Ferlino High Level Language
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++
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.
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
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.
Structured Programming By Jared Wolf
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
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
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
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
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
Object-Oriented Programming By Brandon Schaffer
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
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
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
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
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
Abstraction By Juland Kilpatrick
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
Abstraction levels Abstraction Juland Kilpatrick • High level of abstraction • Global • Low level of abstraction • Local
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
Advantages/ Disadvantages Abstraction Juland Kilpatrick • Advantages of Abstraction • Efficient • Simplifies the main idea • Disadvantages of Abstraction • Time consuming • Possible human error
Subroutines and Parameters By Eugene Peterson
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.
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 .
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.
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.
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
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.
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
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
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
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
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
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