Uploaded by Kyle Shunt

Week1 CM MDL CS328

advertisement
ASIAN INSTITUTE OF COMPUTER STUDIES
Bachelor of Science in Computer Science
Course Modules
CS328 - Programming Languages
3rd Year – 2nd Semester
MODULE 1: PROGRAMMING LANGUAGE
WEEK 1
Learning Outcomes:
After completing this course you are expected to demonstrate the following:
This course provides students the fundamental overview of programming languages, different
generations of programming language and identify types of programming language
language.
A. Engage
Quotation Station
Figure 1.0: Steve Jobs (1997)
A famous quote by the late Steve Jobs
Jobs. Steve was a charismatic pioneer of the personal computer era.
With Steve Wozniak, Jobs founded Apple Inc. in 1976 and transformed the company into a world
leader in telecommunications. Widely considered a visionary and a genius, he ov
oversaw the launch of
such revolutionary products as the iPod and the iPhone.
B. Explain
Steve Jobs once said, "Everybody in this country should learn how to program a computer... because
it teaches you how to think."
Computer programming is an enormously flexible tool that you can use to do amazing things that are
otherwise either manual and labor some or are just impossible. If you're using a smartphone, a chat
app or if you're unlocking your car with the push of a bu
button,
tton, then you must know that all these things
are using some kind of programming. You're already immersed in the programs of different types. In
fact, software is running your life.
A simple computer program is capable of turning things around as you want
want. Something that works on
pushing buttons can be programmed to do so on a tap on your smartphone or when you double clap.
You
ou can switch on/off your electrical appliances using your smartphones.
C. Explore
Video Titles:
1. Computer Science Basics: Programming Languages
2. Generations of programming languages
3. Different Types of Programming Languages
Prepared and Validated By: Mr. Darwin Dela Cruz | Dean Manuel Luis C. Delos Santos, MSCS
Page 1 of 6
ASIAN INSTITUTE OF COMPUTER STUDIES
Bachelor of Science in Computer Science
Course Modules
CS328 - Programming Languages
3rd Year – 2nd Semester
YouTube Links:
1. https://www.youtube.com/watch?v=Y_9t3eQFmU4
2. https://www.youtube.com/watch?v=NFcYll6uJCo
3. https://www.youtube.com/watch?v=GI_V3yzVDtA
Module Video Filenames:
1. Computer Science Basics - Programming Languages_WEEK1
2. Generations of programming languages_WEEK1
3. Different Types of Programming Languages_WEEK1
D. Elaborate
Introduction
A programming
language is
a
computer
language programmer use
to
develop
software
programs, scripts, or other sets of instructions for computers to execute. Although many languages
share similarities, each has its own syntax. Once a programmer learns the languages rules, syntax, and
structure, they write the source code in a text editor or IDE. Then, the programmer often compiles the
code into machine language that can be understood by the computer. Scripting languages, which do not
require a compiler, use an interpreter to execute the script.
Programs need to convert into machine language so that the computer can understand it.
There are two ways to do this:

Compile the program - A compiler reads the whole source code and translates it into a complete
machine code program to perform the required tasks which is output as a new file. This can be
done by using a tool called compiler.

Interpret the program - An interpreter reads the source code one instruction or line at a time,
converts this line into machine code and executes it.
Figure 1.1: Programming Languages Level of Abstraction
A programmer may refer to any of the following:
Alternatively referred to as a coder or software developer, a programmer is an individual who
writes code or creates software for a living. Many programmers who program for a profession have a
college degree in computer science. While each job differs, most programmers are responsible for
creating the software program or parts of a program, debugging problems, or adding onto a program.
Prepared and Validated By: Mr. Darwin Dela Cruz | Dean Manuel Luis C. Delos Santos, MSCS
Page 2 of 6
ASIAN INSTITUTE OF COMPUTER STUDIES
Bachelor of Science in Computer Science
Course Modules
CS328 - Programming Languages
3rd Year – 2nd Semester
Generations of Programming Languages
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,
1.
2.
3.
4.
5.
First generation languages (1GL)
Second generation languages (2GL)
Third generation languages (3GL)
Fourth generation languages (4GL)
Fifth generation languages (5GL)
1. First Generation Language (Machine language)
The first-generation programming language is also called low-level programming language because
they were used to program the computer system at a very low level of abstraction. i.e. at the
machine level. The machine language also referred to as the native language of the computer
system is the first-generation programming language. In the machine language, a programmer only
deals with a binary number.
Advantages of first generation language



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.
2. Second Generation language (Assembly Language)
The second-generation programming language also belongs to the category of low-levelprogramming language. The second-generation language comprises assembly languages that use
the concept of mnemonics for the writing program. In the assembly language, symbolic names are
used to represent the opcode and the operand part of the instruction.
Advantages of second generation language


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.
3. Third Generation languages (High-Level Languages)
The third-generation programming languages were designed to overcome the various limitations of
the first and second-generation programming languages. The languages of the third and later
generation are considered as a high-level language because they enable the programmer to
concentrate only on the logic of the programs without considering the internal architecture of the
computer system.
Advantages of third generation programming language

It is easy to develop, learn and understand the program.
Prepared and Validated By: Mr. Darwin Dela Cruz | Dean Manuel Luis C. Delos Santos, MSCS
Page 3 of 6
ASIAN INSTITUTE OF COMPUTER STUDIES
Bachelor of Science in Computer Science
Course Modules
CS328 - Programming Languages
3rd Year – 2nd Semester


As the program written in these languages are less prone to errors they are easy to
maintain.
The program written in these languages can be developed in very less time as compared to
the first and second-generation language.
Examples: FORTRAN, ALGOL, COBOL, C++, C
4. Fourth generation language (Very High-level Languages)
The languages of this generation were considered as very high-level programming languages
required a lot of time and effort that affected the productivity of a programmer. The fourthgeneration programming languages were designed and developed to reduce the time, cost and
effort needed to develop different types of software applications.
Advantages of fourth generation languages



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.
Examples: Python, Java
5. Fifth generation language (Artificial Intelligence Language)
The programming languages of this generation mainly focus on constraint programming. The major
fields in which the fifth-generation programming language are employed are Artificial Intelligence
and Artificial Neural Networks
Advantages of fifth generation languages


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.
Examples: mercury, prolog, OPS5
Types of Programming Languages
The different types of programming languages are discussed below.
Figure 1.2: Programming Languages Level of Abstraction
Prepared and Validated By: Mr. Darwin Dela Cruz | Dean Manuel Luis C. Delos Santos, MSCS
Page 4 of 6
ASIAN INSTITUTE OF COMPUTER STUDIES
Bachelor of Science in Computer Science
Course Modules
CS328 - Programming Languages
3rd Year – 2nd Semester
1. Procedural Programming Language
The procedural programming language is used to execute a sequence of statements which lead to a
result. Typically, this type of programming language uses multiple variables, heavy loops and other
elements, which separates them from functional programming languages. Functions of procedural
language may control variables, other than function’s value returns. For example, printing out
information.
2. Functional Programming Language
Functional programming language typically uses stored data, frequently avoiding loops in favor of
recursive functions.The functional programing’s primary focus is on the return values of functions,
and side effects and different suggests that storing state are powerfully discouraged. For example, in
an exceedingly pure useful language, if a function is termed, it’s expected that the function not
modify or perform any o/p. It may, however, build algorithmic calls and alter the parameters of
these calls. Functional languages are usually easier and build it easier to figure on abstract issues,
however, they’ll even be “further from the machine” therein their programming model makes it
difficult to know precisely, but the code is decoded into machine language (which are often
problematic for system programming).
3. Object-oriented Programming Language
This programming language views the world as a group of objects that have internal data and
external accessing parts of that data. The aim this programming language is to think about the fault
by separating it into a collection of objects that offer services which can be used to solve a specific
problem. One of the main principle of object oriented programming language is encapsulation that
everything an object will need must be inside of the object. This language also emphasizes
reusability through inheritance and the capacity to spread current implementations without having
to change a great deal of code by using polymorphism.
4. Scripting Programming Language
These programming languages are often procedural and may comprise object-oriented language
elements, but they fall into their own category as they are normally not full-fledged programming
languages with support for development of large systems. For example, they may not have compiletime type checking. Usually, these languages require tiny syntax to get started.
5. Logic Programming Language
These types of languages let programmers make declarative statements and then allow the
machine to reason about the consequences of those statements. In a sense, this language doesn’t
tell the computer how to do something, but employing restrictions on what it must consider doing.
To call these groups ”types of language” is really a bit confusing. It’s easy to program in an objectoriented style in C language. In truth, most of the languages include ideas and features from various
domains, which only helps to increase the usefulness of these types of languages. Nevertheless,
most of the programming languages do not best in all styles of programming.
Prepared and Validated By: Mr. Darwin Dela Cruz | Dean Manuel Luis C. Delos Santos, MSCS
Page 5 of 6
ASIAN INSTITUTE OF COMPUTER STUDIES
Bachelor of Science in Computer Science
Course Modules
CS328 - Programming Languages
3rd Year – 2nd Semester
E. Evaluate
ASSESSMENT:
Instructions: You may write your answer on the Answer Sheet (AS) provided on this module.
I. Identification (2-Point Each):
1. On this generation language comprises assembly languages that use the concept of mnemonics
for the writing program.
2. This language typically uses stored data, frequently avoiding loops in favor of recursive
functions.
3. A language that a programmer uses to develop software programs, scripts or other sets
of instructions for computers.
4. An individual who writes code or creates software for a living.
5. This programming language views the world as a group of objects that have internal data and
external accessing parts of that data.
6. Type ofprogramming language that let programmers make declarative statements and then
allow the machine to reason about the consequences of those statements.
7. A language that used to execute a sequence of statements which lead to a result.
8. A high-level language that enabled the programmer to concentrate only on the logic of the
programs without considering the internal architectures.
9. This generation languages can be used to query the database in a fast and efficient manner.
10. The machine language also referred to as the native language of the computer system.
References:
1. Programming Language Definition–
https://trustonailende.com/programming-languages/
2. Lecture Notes on Generation and Types of Programming Language–
https://www.includehelp.com/basics/generations-of-programming-language.aspx
https://www.typesnuses.com/types-of-programming-languages-with-differences/
Facilitated By:
Name
:
MS Teams Account (email)
Smart Phone Number
:
:
Prepared and Validated By: Mr. Darwin Dela Cruz | Dean Manuel Luis C. Delos Santos, MSCS
Page 6 of 6
Download