18
LEARNING COMPUTER PROGRAMMING By: Fayereene Sudara & Ysadora Pilar

Learning programming by: Ysa & Faye

Embed Size (px)

Citation preview

Page 1: Learning programming by: Ysa & Faye

LEARNING COMPUTER

PROGRAMMINGBy: Fayereene Sudara & Ysadora Pilar

Page 2: Learning programming by: Ysa & Faye

Introduction to Programming

Program is a set of step by step instruction that tells or directs the computer what to do. It is also involves activities such as analysis, developing understanding, generating algorithms, verification of requirements of algorithms.

• The purpose of programming is to find a sequence of instructions that will automate performing a specific task or solving a given problem.

Page 3: Learning programming by: Ysa & Faye

What is Programmer?

• A programmer is the person who designs a program. It converts problem solutions into instructions for the computer. The programmer designs the program, decides which of the programs set of instructions to use and tests the program to see if it is working as designs.

• Programmer usually have an extensive background in some form of computer coding language, which may include XML, PHP, Perl, HTML, or SQL.

• Programmers may specialize in one area or may write instructions for a wide range of systems or programs.

 

Page 4: Learning programming by: Ysa & Faye

Who Developed Computer Programming?

• Augusta Ada King, Countess of Lovelace (10 December 1815 – 27 November 1852), born Augusta Ada Byron and now commonly known as Ada Lovelace, was an English mathematician and writer chiefly known for her work on Charles Babbage's early mechanical general-purpose computer, the Analytical Engine.

• She created the first algorithm designed for processing by a computer and is usually recognized as history's first computer programmer.

• Lovelace's notes are important in the early history of computers. She also developed a vision on the capability of computers to go beyond mere calculating or number-crunching, while others, including Babbage himself, focused only on those capabilities.

Page 5: Learning programming by: Ysa & Faye

History • Ancient cultures had no conception of computing beyond arithmetic, algebra, and

geometry, occasionally aping elements of calculus (e.g. the method of exhaustion). The only mechanical device that existed for numerical computation at the beginning of human history was the abacus, invented in Sumeria circa 2500 BC.

• The first computer program was written for the Analytical Engine by mathematician Ada Lovelace to calculate a sequence of Bernoulli numbers.[8] The synthesis of numerical calculation, predetermined operation and output, along with a way to organize and input instructions in a manner relatively easy for humans to conceive and produce, led to the modern development of computer programming. Development of computer programming accelerated through the Industrial Revolution.

• As time has progressed, computers have made giant leaps in the area of processing power. This has brought about newer programming languages that are more abstracted from the underlying hardware. Popular programming languages of the modern era include Action Script, C, C++, C#, Haskell, PHP, Java, JavaScript, Objective-C, Perl, Python, Ruby, Smalltalk, SQL, Visual Basic, and dozens more.

Page 6: Learning programming by: Ysa & Faye

Importance of Computer Programming

• Programming language is important because it defines the relationship, semantics and grammar which allows the programmers to effectively communicate with the machines that they program.

•  Computer programmers have a full understanding of the how and why of computer systems, including system limitations, and can set realistic expectations and work around those limitations to fully maximize the use of the equipment and its accessories.

• An important reason to consider learning about how to program a computer is that the concepts underlying this will be valuable to you, regardless of whether or not you go on to make a career out of it.  One thing that you will learn quickly is that a computer is very dumb but obedient.  It does exactly what you tell it to do, which is not necessarily what you wanted.  Programming will help you learn the importance of clarity of expression.

Page 7: Learning programming by: Ysa & Faye

• Computers are extremely important in the modern world of today. In the fast moving life of the modern world of today, computers hold tremendous significance. Many of us will feel crippled without a computer, as we have gotten so used to this machine. The importance of computers can not be denied in the corporate or business world, at the work place and even in one's personal life.

• Computer programming as of now is very important because it is part of our daily living even you like it or not. That is the truth just of my own observation that most likely happening in this  new world.

Page 8: Learning programming by: Ysa & Faye

Program Life Cycle

• There are five steps in writing or creating a program. This include the following:

1. Identifying the Problem

• It involves determining the requirement of the program. The computer user must figure out the problem, and the best program to fix it. 

2. Planning the Solution

• There are two ways of planning the solution to a problem, they are; 1. Draw a flowchart and 2. Write a pseudo code. Flowchart is a graphical representation of the step-by-step instruction to be done in a program while pseudo code is listing down the set of instructions to be used in program.

Page 9: Learning programming by: Ysa & Faye

3. Coding the Program

• This is using the language of programming to write the lines of code. The code is called the listing or the source code. The computer user will run an object code for this step.

• If human language follows grammar in writing and speaking, programming languages have their own set of rules to follow, this is called syntax. Violation of the rule set by programming language used in a certain program will produce an error called syntax error. One of the common causes of syntax error is misspelling.

Page 10: Learning programming by: Ysa & Faye

4. Testing the Program

• After coding the program, it is important to test if it is running. If it runs properly, then it is free from syntax error, however, there will be instances that it does not meet the requirements of the program.

There are three phases of testing the program:

1. Desk Checking - in this phase the programmer just mentally traces or checks the logic of the program to make sure that it is error free.

2. Translation - in this phase the programming language uses a translator to ensure that the programmer did not violate any language rules by the chosen programming language. 

3. Debugging - this means detecting, locating and correcting bugs. In programming, error or mistakes are called bugs. In debugging phase you run the program and use dummy data in test data.

Page 11: Learning programming by: Ysa & Faye

5. Documentation

• This step is the final step of gathering everything together. Internal documentation is involved in this step because it explains the reasoning one might have made a change in the program or how to write a program.

• It contains brief narrative process undergone by the program, from the identification of the problem, planning the solution through flowcharting and pseudo code, coding of the program up to the testing results.

Page 12: Learning programming by: Ysa & Faye

 Procedural and Non-

procedural LanguagesProcedural Languages Programming language which are considered procedural uses a series of instructions or statements which are sequential from the beginning to the end. This means that execution of instructions is line by line and it is

terminated after the last instruction.

Examples of Procedural Language are the following:

• BASIC (Beginner's All-Purpose Symbolic Instruction Code)

• COBOL (Common Business Oriented Language)

• PASCAL

• FORTRAN (Formula Translated)

• C

• PL 1 (Programming Language 1 )

Page 13: Learning programming by: Ysa & Faye

Non- Procedural Languages• These programming languages are considered as object-oriented programming language. They

are event- duvet which means that a programmer selects an event that needs to occur before the instruction or statement is occurred. It is different from a procedural

language since statement are not executed line per line instead a series of instructions are executed as a whole when an event occurs.

Examples of event are click, double-click, drag and drop, mouse over and other event.Examples of Non-Procedural Languages are:

VISUAL BASIC C++

• JAVA DELPHI

Page 14: Learning programming by: Ysa & Faye

Flow Charting

•Flow chart is the one of the processes used in designing or planning the solution

to a problem. It is a graphical representation to the solution of a problem. It uses shapes to show

instructions and arrow lines and heads to display the flow.

Page 15: Learning programming by: Ysa & Faye

Shape

Name

ActionRepresented

Oval Terminal symbol Represents start and end of program.

Parallelogram Input / output Indicates input output 

Rectangle 

ProcessThis represents

processing of action. E.g. mathematical operator.

 Diamond

 Decision

Since computer only answer the question

yes/no, this is used to represent logical test for

the program.Hexagon Initialization/

preparationThis is used to prepare

memory for repetition of an action.

Arrow Lines and Arrow Heads

Direction This shows the flow of the program.

  Annotation This is used to describe action or variables.

Circle

On page connector This is used to show connector or part of

program to another part.

 Pentagon

Off-page connector

This is used to connect part of a program to

another part on the other page or paper.

Symbols used in Flowcharts

Pictures

Page 16: Learning programming by: Ysa & Faye

Levels of Programming Languages

There are five levels of programming languages. These languages are used in their respective generation. Basically each generation is an improvement of the latter generation.  Machine Languages or First Generation Programming LanguageThis is considered to be the lowest level of programming language. The program is represented by 1s and 0s. We all know that 1s and 0s or binary number is the only language the computer understands. Machine language programming is a very tedious task because for just a simple task, the program code required would be very long.

Assembly Language or Second Language Programming LanguageThis is also considered as low level language. However, programmers would find this language easier to use than machine language. Instead of using 1s and 0s, assembly language uses mnemonic codes. Mnemonic codes are abbreviations that are easy to remember. Each type of computer has its own assembly language. This means that once you have started your programming, you cannot use a different computer to continue your work. 

 

Page 17: Learning programming by: Ysa & Faye

High Level Language or Third Generation Programming Languages (3GL)

This language transformed programming in the early 1960s. It makes programming easier since the language is now written in English like manner. If assemble is used by assembly language, third generation languages use translator to convert the program into a machine language.  Very High Level Languages or Fourth Generation Languages (4GL)Fourth generation languages (4GL) simplifies further the third level generation language (3GL) because there is a reduction in the number of instructional statements. One hundred (100) lines of instruction in 3GLs can be reduced to five (5) to twenty (20) lines of instructions 4GL.  Natural LanguagesThese languages are considered to be that fifth generation languages. These programming languages are called natural languages because of their resemblance to English language. Natural Languages have the capability to translate human instructions into code that a computer understands. If it gets confused with the user’s instructions, it asks for further explanation.

Page 18: Learning programming by: Ysa & Faye

FAYEREENE APRIELLE SUDARA

YSADOR A GRACE PILAR

GRADE

9

SSC

N

E

U

M

A

N

N