Chapter01 IntroductionToComputerProgramming
Chapter01 IntroductionToComputerProgramming
Disclaimer
This learning material is used in compliance with the flexible teaching-learning approach
espoused by CHED in response to the pandemic that has globally affected educational institutions.
Authors and publishers of the contents are well acknowledged. As such, the college and its faculty
do not claim ownership of all sourced information. This learning material will solely be used for
instructional purposes not for commercialization.
Chapter
Introduction
to
Computer
Programming
Module Overview
Learning Outcomes
summarize the
history of
programming
languages.
Programming Language. The programmer uses this tool to write or code programs.
Do you know what a programming is? Have you seen a computer program?
The term programming means to create (or develop) software, which is also called a
program. In basic terms, software contains the instructions that tell a computer—or a
computerized device—what to do.
Software is all around you, even in devices that you might not think would need it. Of
course, you expect to find and use software on a personal computer, but software also plays a
role in running airplanes, cars, cell phones, and even toasters. On a personal computer, you
use word processors to write documents, Web browsers to explore the Internet, and e-mail
programs to send and receive messages. These programs are all examples of software.
Software developers create software with the help of powerful tools called programming
languages.
If you learn to program using one language, you should find it is easier for you to learn
other programming languages. The key is to learn how to solve problems using a programming
approach.
LESSON 1: History of Computer
Programming
The first computer programming language was created in 1883, when Ada Lovelace
worked with Charles Babbage on his very early mechanical computer, the Analytical Engine.
While Babbage was concerned with simply computing numbers, Lovelace saw that the numbers
the computer worked with could represent something other than just amounts of things. She
wrote an algorithm for the Analytical Engine that was the first of its kind. Because of her
contribution, Lovelace is credited with creating the first computer programming language. As
different needs have arisen and new devices have been created, many more languages have
followed.
1883: Algorithm for the Analytical Engine: Created by Ada Lovelace for Charles
Babbage’s Analytical Engine to compute Bernoulli numbers, it’s considered to be the first
computer programming language.
1949: Assembly Language: First widely used in the Electronic Delay Storage Automatic
Calculator, assembly language is a type of low-level computer programming language that
simplifies the language of machine code, the specific instructions needed to tell the computer
what to do.
1952: Autocode: Autocode was a generic term for a family of early computer
programming languages. The first was developed by Alick Glennie for the Mark 1 computer at
the University of Manchester in the U.K. Some consider autocode to be the first compiled
computer programming language, meaning that it can be translated directly into machine code
using a program called a compiler.
1959: LISP: Created by John McCarthy of MIT, LISP is still in use. It stands
for LISt Processing language. It was originally created for artificial intelligence research but today
can be used in situations where Ruby or Python are used.
1970: Pascal: Developed by Niklaus Wirth, Pascal was named in honor of the French
mathematician, physicist, and philosopher Blaise Pascal. It is easy to learn and was originally
created as a tool for teaching computer programming. Pascal was the main language used for
software development in Apple’s early years.
1972: Smalltalk: Developed by Alan Kay, Adele Goldberg, and Dan Ingalls at Xerox Palo
Alto Research Center, Smalltalk allowed computer programmers to modify code on the fly and
also introduced other aspects now present in common computer programming languages
including Python, Java, and Ruby.
1972: SQL: SQL was developed by Donald D. Chamberlin and Raymond F. Boyce at
IBM. SQL stands for Structured Query Language. It is used for viewing and changing information
that is stored in databases. SQL uses command sentences called queries to add, remove, or
view data.
1978: MATLAB: Developed by Cleve Moler. MATLAB stands for Matrix Laboratory. It is
one of the best computer programming languages for writing mathematical programs and is
mainly used in mathematics, research, and education. It can also be used to create two- and
three-dimensional graphics.
1983: Objective-C: Created by Brad Cox and Tom Love, Objective-C is the main
computer programming language used when writing software for macOS and iOS, Apple’s
operating systems.
1983: C++: C++ is an extension of the C language and was developed by Bjarne
Stroustrup. It is one of the most widely used languages in the world. C++ is used in game engines
and high-performance software like Adobe Photoshop. Most packaged software is still written in
C++.
1987: Perl: Perl was originally developed by Larry Wall in 1987 as a scripting language
designed for text editing. Its purpose was to make report processing easier. It is now widely used
for many purposes, including Linux system administration, Web development, and network
programming.
1990: Haskell: Named after Haskell Brooks Curry, an American logician and
mathematician. Haskell is called a purely functional computer programming language, which
basically means that it is mostly mathematical. It is used by many industries, especially those
that deal with complicated calculations, records, and number-crunching.
1991: Python: Designed by Guido Van Rossum, Python is easier to read and requires
fewer lines of code than many other computer programming languages. It was named after the
British comedy group Monty Python. Popular sites like Instagram use frameworks that are written
in Python.
1991: Visual Basic: Developed by Microsoft, Visual Basic allows programmers to choose
and change pre-selected chunks of code in a drag-and-drop fashion through a graphical user
interface (GUI).
1993: R: Developed by Ross Ihaka and Robert Gentleman at the University of Auckland,
New Zealand, R is named after the first names of the first two authors. It is mostly used by
statisticians and those performing different types of data analysis.
1995: Java: Originally called Oak, Java was developed by Sun Microsystems. It was
intended for cable boxes and hand-held devices but was later enhanced so it could be used to
deliver information on the World Wide Web. Java is everywhere, from computers to smartphones
to parking meters. Three billion devices run Java!
1995: PHP: Created by Rasmus Lerdorf, PHP is used mostly for Web development and
is usually run on Web servers. It originally stood for Personal Home Page, as it was used by
Lerdorf to manage his own online information. PHP is now widely used to build websites and
blogs. WordPress, a popular website creation tool, is written using PHP.
1995: Ruby: Ruby was created by Yukihiro “Matz” Matsumoto, who combined parts of
his favorite languages to form a new general-purpose computer programming language that can
perform many programming tasks. It is popular in Web application development. Ruby code
executes more slowly, but it allows for computer programmers to quickly put together and run a
program.
1995: JavaScript: Created in just 10 days by Brendan Eich, this language is mostly used
to enhance many Web browser interactions. Almost every major website uses Javascript.
2000: C#: Developed by Microsoft with the goal of combining the computing ability of C++
with the simplicity of Visual Basic, C# is based on C++ and is similar to Java in many aspects. It
is used in almost all Microsoft products and is primarily used for developing desktop applications.
2003: Groovy: Developed by James Strachan and Bob McWhirter, Groovy is derived
from Java and improves the productivity of developers because it is easy to learn and concise.
2009: Go: Go was developed by Google to address problems that can occur in large
software systems. Since computer and technology use is much different today than it was when
languages such as C++, Java, and Python were introduced and put to use, problems arose when
huge computer systems became common. Go was intended to improve the working environment
for programmers so they could write, read, and maintain large software systems more efficiently.
2014: Swift: Developed by Apple as a replacement for C, C++, and Objective-C, Swift is
supposed to be easier to use and allows less room for mistakes. It is versatile and can be used
for desktop and mobile apps and cloud services.
Most computer programming languages were inspired by or built upon concepts from
previous computer programming languages. Today, while older languages still serve as a strong
foundation for new ones, newer computer programming languages make programmers’ work
simpler. Businesses rely heavily on programs to meet all of their data, transaction, and customer
service needs. Science and medicine need accurate and complex programs for their research.
Mobile applications must be updated to meet consumer demands. And all these new and growing
needs ensure that computer programming languages, both old and new, will remain an important
part of modern life.
Synthesis
Computer programming is defined as telling a computer what to do through a special set
of instructions which are then interpreted by the computer to perform some task(s). These
instructions can be specified in one or more programming languages including Java, C, C++ and
a lot more.
A computer goes through a set of steps whose purpose is to achieve something. These
steps are instructed to the computer by computer programs. Essentialy, computer programming
is the process by which these programs are designed and implemented.
The advantages to learning computer programming include gaining new skills, being able
to tell the computer what to do, and becoming better acquainted with computers. Computer
programming is a challenging and rewarding discipline. Whatever you plan on building, the road
ahead of you is an interesting one.
Programming languages have been developed over the year in a phased manner. Each
phase of developed has made the programming language more user-friendly, easier to use and
more powerful. Each phase of improved made in the development of the programming languages
can be referred to as a generation. The programming language in terms of their performance
reliability and robustness can be grouped into five different generations:
• They are translation free and can be directly executed by the computers.
• The programs written in these languages are executed very speedily and efficiently by
the CPU of the computer system.
• The programs written in these languages utilize the memory in an efficient manner
because it is possible to keep track of each bit of data.
• It is easy to develop understand and modify the program developed in these languages
are compared to those developed in the first-generation programming language.
• The programs written in these languages are less prone to errors and therefore can be
maintained with a great case.
• These programming languages allow the efficient use of data by implementing the
various database.
• They require less time, cost and effort to develop different types of software
applications.
• The program developed in these languages are highly portable as compared to the
programs developed in the languages of other generation.
• These languages can be used to query the database in a fast and efficient manner.
• In this generation of language, the user can communicate with the computer system
in a simple and an easy manner.
1. Give at least two (2) programming language in each generation and discuss them
briefly. (20 pts)
LESSON 3: Programming Concepts
The concepts discussed here are essential knowledge to anyone who wants to become
skilled in computer programming. While some are not universal, these concepts are present in most
computer programming languages and/or are a fundamental part of the programming process.
The actual text used to write the instructions for a computer program. This text is then
translated into something meaningful the computer can understand.
3.2. Compiler
A software tool that translates source code into data that the computer can understand.
Specifically, a compiler is used to turn source code into object code. The object code is then
passed through a program called a linker which turns it into an executable program.
3.4. Variable
A container which represents a value in a program. Variables can store different types
of data including numeric values, single characters, and text strings. The value of a variable
can change all throughout a program.
3.5. Constant
The same thing as a variable with one major difference - the value of a constant does
not change, while the value of a variable can change all throughout a program.
3.6. Conditional
A set of code that will execute only if a certain condition is true. Conditionals are used
to test expressions and perform certain operations accordingly. For example, you could test a
number input by the user and if it is too high print the message "The number entered is to high"
and the program exits. Thanks to conditionals, a program can work differently every time it runs.
3.7. Array
A special type of variable used in many programming and web languages including
PHP, Javascript, and Java that contains a list of related values. For example, a colors array
would contain a list of colors.
3.8. Loop
A segment of code that executes repeatedly based on a certain condition. Loops are used
to perform tasks repeatedly a certain amount of times. For example, if you needed to print the
numbers 1 to 10. You can use a loop for this task instead of manually printing all the numbers.
3.9. Function
A set of code used to carry out specific tasks. A function can take parameters
which will affect its output as well as return values. Functions prevent unnecessary
redundancy because you can use them as much as needed instead of retyping some
code over and over. For example, if you need to multiply two numbers, instead of doing
the calculation manually every time, you can supply the data to a function through some
parameters which will do it for you.
3.10. Class
• Problem Definition
• Problem Analysis
• Algorithm Development
• Coding & Documentation
• Testing & Debugging
• Maintenance
In this phase, we define the problem statement and we decide the boundaries
of the problem. In this phase we need to understand the problem statement, what is
our requirement, what should be the output of the problem solution. These are defined
in this first phase of the program development life cycle.
4.2 Problem Analysis
During this phase, we develop a step by step procedure to solve the problem
using the specification given in the previous phase. This phase is very important for
program development. That means we write the solution in step by step statements.
During this phase, we check whether the code written in previous step is solving
the specified problem or not. That means we test the program whether it is solving the
problem for various input data values or not. We also test that whether it is providing
the desired output or not.
4.6 Maintenance
During this phase, the program is actively used by the users. If any
enhancements found in this phase, all the phases are to be repeated to make the
enhancements. That means in this phase, the solution (program) is used by the end
user. If the user encounters any problem or wants any enhancement, then we need to
repeat all the phases from the starting, so that the encountered problem is solved, or
enhancement is added.
1. Alyssa joy salazar. (2014). Program Development Life Cycle [YouTube Video]. In
YouTube. https://www.youtube.com/watch?v=YV6ykfG1nQY
2. Destin Learning. (2019). What Are The Steps of the Software Development
Lifecycle? [YouTube Video]. In YouTube.
https://www.youtube.com/watch?v=gNmrGZSGK1k
3. FuseupTech. (2020). FuseupTech [YouTube Video]. In YouTube.
https://www.youtube.com/watch?v=N8q1r99CUs4
NAME:
PROGRAM / YR / BLK:
COURSE CODE / TITLE: AEC9 – Business Logic
TIME / DAY:
CHAPTER1
1. Discuss the stages the stages in the program development process ( 10 pts)
2. If will develop an application program, what would it be? State your reasons. (10 pts)
NAME:
PROGRAM / YR / BLK:
COURSE CODE / TITLE: AEC9 – Business Logic
TIME / DAY:
CHAPTER1
Assignment
Farrell, J. (2017). Programming logic & design, comprehensive (9th ed.). Cengage
Learning.
Javatpoint. (2018). Features of Java. www.javatpoint.com. Retrieved May 22, 2020, from
https://www.javatpoint.com/features-of-java
Linda DeMichiel, Bill Shannon (2017). Oracle: Java Platform, Enterprise Edition (Java
EE) Specification, v8 Oracle America, Inc.
Oracle. (2012, April 1). Differences between Java EE and Java SE - Your first cup: An
introduction to the Java EE platform. Moved.
https://docs.oracle.com/javaee/6/firstcup/doc/gkhoy.html
Oracle. (2020). Java(TM) web start. Oracle | Integrated Cloud Applications and Platform
Services. Retrieved May 11, 2020, from
https://www.oracle.com/technetwork/java/javase/tech/index
Parewa Labs Pvt. Ltd. (n.d.). Learn Java programming. Programiz: Learn to Code for
Free. Retrieved June 2, 2020, from https://www.programiz.com/java-programming