Programming lesson1

187 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
187
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Programming lesson1

  1. 1. PROGRAMMING 3RD GRADING PERIOD – LESSON 2
  2. 2. What is Programming? Programming is a creative process done by programmers to instruct a computer on how to do a task. Programming is instructing a computer to do something for you with the help of a programming language.
  3. 3. What is a Program?  In computing, a program is a specific set of ordered operations for a computer to perform. In the modern computer that John von Neumann outlined in 1945, the program contains a one-at-a-time sequence of instructions that the computer follows. Typically, the program is put into a storage area accessible to the computer. The computer gets one instruction and performs it and then gets the next instruction.
  4. 4. What is a Programmer? A programmer is a person who prepares instructions for computers.
  5. 5. A programmer needs to develop a welldefined concept of how to solve a problem. Then this concept must be translated into a computer language. Finally, the program needs to be typed into the computer, tested, and debugged before being placed into service.
  6. 6. What is a Programming Language? Programming Language is a language used to give instructions to computers.
  7. 7. During the 1960s and 1970s, a huge variety of programming languages were developed, most of which are no longer in wide use. Moreover, a substantial amount of programming is now done with special program development tools (e.g., Visual Basic), or in programming languages that pertain to specific pieces of software (e.g., Maple) rather than by simply writing instructions in a general-purpose language.
  8. 8. The following is a rough classification of programming languages. 1. General-purpose languages for large, complex programs: PL/I, C, C++, Pascal, Modula-2, Ada, Java, C#. 2. General-purpose languages for smaller programs: BASIC, Visual Basic, Pascal, Python. 3. Mathematical calculation, science, and engineering: FORTRAN, APL, Maple, and the general-purpose languages named above. 4. Business data processing: COBOL, RPG. Where microcomputers are involved, BASIC, C, and languages associated with specific database products are also widely used. 5. Artificial intelligence and programs of extreme logical complexity: Lisp and Prolog. 6. String handling and scripting: SNOBOL, REXX, Awk, Perl, Python, VBSCRIPT, JavaScript.
  9. 9. Another useful classification is based on the way the program is organized. 1. Sequential languages treat the program as a series of steps, with an occasional GOTO statement as a way of breaking out of the sequence. In this category are FORTRAN, BASIC, and COBOL(though COBOL also allows programs to be written in a style more like a block-structured language).
  10. 10. 2.Block-structured languages encourage structured programming by allowing the programmer to group statements into functional units. This category originated with Algol and now includes Pascal, Modula-2, C, PL/I, and Ada.
  11. 11. Structured Programming?  Structured programming is a programming technique that emphasizes clear logic, modularity, and avoidance of GO TO statements (which are intrinsically errorprone).  Structured programming is a style of programming designed to make programs more comprehensible and programming errors less frequent.
  12. 12. 3.Object-oriented languages allow the programmer to define new data types and associate procedures with them. Languages of this type include C++, Java, C#, object-oriented extensions of Pascal, and Smalltalk.
  13. 13. 4.Symbolic languages allow the program to examine and modify itself, treating instructions as data. Lisp and Prolog fall into this category.
  14. 14. Although names of some programming languages are normally written in all capital letters, names of most languages are not, even if they are acronyms. Usage varies from language to language. With some, usage has shifted over the years.
  15. 15. BASIC?  BASIC (Beginner’s All-purpose Symbolic Instruction Code) a computer language designed by John Kemeny and Thomas Kurtz in 1964 and popularized by Microsoft in the 1970s.  BASIC is good for programming simple calculations quickly, and you do not have to learn much of the language in order to begin using it.  Because no declarations are required, programs can be quite short.
  16. 16.  In the 1970s and 1980s, numerous software vendors, especially Microsoft, added features to BASIC to support STRUCTURED PROGRAMMING and a wide variety of DATASTRUCTURES. Today, BASIC is one of the most complex programming languages in wide use, incorporating features from Pascal, FORTRAN, and C. Line numbers are no longer necessary.  However, BASIC is still easy for beginners to use, and the newest BASIC compilers still accept programs written in Kemeny and Kurtz’s original language.
  17. 17. BASIC program and its output 10 REM Temperature conversion program 20 PRINT ”Temperature in Fahrenheit”; 30 INPUT F 40 LET C=(F-32)*5/9 50 PRINT F;” F equals ”; 60 PRINT C;” C” 70 END Temperature in Fahrenheit? 98 98 F equals 36.66667 C
  18. 18. VISUAL BASIC?  One of the first successful interactive development environments for Windows programming, introduced by Microsoft in 1991.  Programmers can lay out the program’s windows graphically and write BASIC code to specify what happens when each button is clicked or other events occur.  Any part of the layout or code can be changed at any time.  Unlike in earlier Windows programming environments, the programmer need not write any general code to initialize windows, handle events, or interact with the operating system.
  19. 19. The current version is called Visual Basic .NET or VB.NET and uses the .NET Framework for fully object-oriented programming. Similar products for other programming languages include Microsoft’s Visual C++ and Visual C# and Borland’s Delphi and Kylix (for Pascal), JBuilder (for Java), and C++ Builder.
  20. 20. .NET Framework?  An application program interface (API) for Microsoft Windows, introduced in 2001 as a downloadable add-on to Windows 2000 and XP and included in subsequent versions of Windows.  The purpose of the .NET Framework is to reduce the amount of work programmers have to do, while at the same time increasing reliability and introducing Java-like portability.  The .NET Framework is fully object-oriented.  The .NET Framework manages the memory used by each program.  Like Java, the .NET Framework normally compiles programs into bytecode, a concise notation that is converted to machine language when the program is ready to run.
  21. 21. Bytecode? Bytecode is the compiled code that compilers for Java and C# produce. It isn't true machine code but a simpler code made up of instructions that are one byte long.

×