Presentation is loading. Please wait.

Presentation is loading. Please wait.

Identify object-oriented programming languages. A computer program is a series of instructions that direct a computer to perform specific tasks. A programming.

Similar presentations


Presentation on theme: "Identify object-oriented programming languages. A computer program is a series of instructions that direct a computer to perform specific tasks. A programming."— Presentation transcript:

1 Identify object-oriented programming languages

2 A computer program is a series of instructions that direct a computer to perform specific tasks. A programming language is a set of words, symbols, and codes that enable a programmer to instruct the computer to perform a set of tasks. Programming languages are either low-level or high-level. Computer Programs

3 Low-level Programming Languages  Machine Language - a first generation computer language  Assembly Language – a second generation computer language

4 Machine language uses a series of binary digits (1s and 0s), or combinations of numbers and letters that represent binary digits, and is the only language a computer directly understands. Machine Language (First Generation Language) 00090 00009050E030B2 010B4 0000941B44 0000961B55 000098F27330D62C81010D800C83 00009A4F5030D6010D8 0000A0F27530D62C7B010D800C7D 0000A44F7030D6010D8 0000AE5070304A0104C 0000B21C47 0000B45050304E01050 0000B858E030B2010B4 0000BC07FE

5 Assembly language uses symbolic instruction codes. Symbolic instruction codes are meaningful abbreviations & codes in which “A” might stand for addition, “C” might stand for compare, or “M” might stand for multiply. Assembly languages also use symbolic addresses to identify storage locations. For example, RATE might refer to a storage location that contains the pay rate being used in the program. This language is slightly more user friendly than machine language. Assembly Language (Second Generation Language) CALCPAYEQU* ST14,SAVERTPY SR4.4 SR7.7 SR5.5 PACKDOUBLE,RTHRSIN CVB4.DOUBLE ST7.RATE

6 High-Level Languages (Procedural Programming Languages) With a procedural language, or third-generation language (3GL), programmers write instructions using code that is very similar to the English language, which simplifies the program development process. For example, ADD stands for addition and PRINT means to print. Arithmetic operations are represented by + for addition, - for subtraction, / for division, and * for multiplication. *COMPUTE REGULAR TIME PAY MULTIPLY REGULAR-TIME HOURS BY HOUR-RATE GIVING REGULAR-TIME-PAY *COMPUTER OVERTIME PAY IF OVERTIME-HOURS >0 COMPUTER OVERTIME-PAY = OVERTIME-HOURS * 1.5 * HOUR RATE ELSE MOVE 0 TO OVERTIME PAY

7 Popular Standard procedural languages are: BASIC—a simple, interactive problem-solving language COBOL—a language designed for business applications C—a powerful language that requires professional programming skills High-Level Languages (Procedural Programming Languages)

8 Below is an example of code written in BASIC: High-Level Languages (BASIC) Sample 1: Unstructured original BASIC (Applesoft BASIC) Sample 2: Modern Structured BASIC (e.g. QBASIC)

9 An example of code written in COBOL. COBOL stands for Common Business Oriented Language High-Level Languages (COBOL)

10 Below is an example of code written in “C”: High-Level Languages (C) /* Computer Regular Time Pay*/ rt_pay – rt_hrs * pay_rate; /* Computer Overtime Pay*/ if (ot_hrs > 0) ot_pay – ot_hrs * 1.5 * pay_rate; else ot_pay = 0; /* Compute Gross Pay*/ Gross – rt_pay * ot_pay; /* Print Gross Pay*/ Printf(“The gross pay is %d\n”. gross):

11 A tcompiler or an interpreter ranslates the 3GL source program into a machine language object code that a computer can execute. An interpreted program runs each line of code individually and translates it into machine language while it is executing the program. A compiled program is run through a compilation process that converts the entire program from the source code into machine code. Compiled programs run much faster than interpreted programs and are usually identified by the filename extension of.exe. Compiling or Interpreting Computer Code

12 Visual programming languages are sometimes called fifth-generation languages (5GL) and provide a visual or graphical interface, called a visual programming environment (VPE) for creating source code. Visual Programming

13 Visual programming languages are often used in a rapid application development (RAD) environment. RAD allows programmers to implement a program in segments and use pre-built components which simplify program development. Visual Programming Rapid Application Development (RAD) An example of RAD would be the icons shown on the above desktop and folder. The icon of the diskdrive representing the computer drives is used in several places – but the same routine is used to create all of them.

14 Visual programming languages include: Visual Basic.NET 2003 Visual C++.NET 2003 Visual C#.NET 2003 Delphi PowerBuilder Visual Programming This is an example of a Visual Basic 6.0 environment used to create a program in Visual Basic.

15 Characteristics of Object-Oriented Programming Languages Programmers use an object-oriented programming (OOP) language to implement object-oriented design. An object is an item that can contain both data and the procedures that read or manipulate the data. A major benefit of OOP is its ability to reuse and modify existing objects, which allows programmers to create applications faster. OOP languages include C++, which is an object-oriented extension of the C programming language, and Java, which is similar to C++ but uses a just-in-time (JIT) compiler to convert its source code into machine code.

16 On the right is the HTML code that produced the webpage shown on the left. Examine the code and see if you can determine what some of it does. See if you can explain what the code in red does. Web Page Written in HTML DogieO's Homepage DoggieO's Home Page Hello, my name is DoggieO. I enjoy all aspects of life, especially chasing other animals. I am a freshman at Cannine High School where I am on the Fetch Team. Below are my favoriate links. Petsmart where I get my food and toys. Google Search Engine where I get all my information.

17 On the right is the Java code that makes the buttons on the left page change color. When the user “mouse-overs” the button, it switches the graphic which represents the button so that the button appears to change colors or “light up” showing it is active. Below are the two buttons that switch in and out of the page as a result of the Java script code below. Web Page Written in Java Pop Activities Page script LANGUAGE="JavaScript"><!-- if (navigator.userAgent.indexOf("Mozilla") != -1) { if (parseInt(navigator.appVersion) > 2) BrowserOK = 1; else BrowserOK = 0; } function highlight(img) { if (BrowserOK == 0) return; document[img].src = img + "G.jpg"; } function unhighlight(img) { if (BrowserOK == 0) return; document[img].src = img + "S.JPG"; } // -->

18 As you can see, we have many languages. Below are just a few. Languages are improved upon or new languages are developed as we find new applications and uses for computers.

19 Although we have many languages, they all share common elements; so it is easy to learn and program in other languages once you are exposed to writing code for one program language.


Download ppt "Identify object-oriented programming languages. A computer program is a series of instructions that direct a computer to perform specific tasks. A programming."

Similar presentations


Ads by Google