0% found this document useful (0 votes)
4 views16 pages

Chapter 5 - Part 1

Chapter Five introduces the fundamentals of computers, programming, and the Java programming language. It explains the concept of programming, the different types of computer languages, and the process of interpreting and compiling source code. The chapter also highlights the significance of Java as a versatile programming language used for various applications across different platforms.

Uploaded by

mm85rz8t9g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views16 pages

Chapter 5 - Part 1

Chapter Five introduces the fundamentals of computers, programming, and the Java programming language. It explains the concept of programming, the different types of computer languages, and the process of interpreting and compiling source code. The chapter also highlights the significance of Java as a versatile programming language used for various applications across different platforms.

Uploaded by

mm85rz8t9g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Fundamentals of Information Technology

Chapter Five (Part 1)

Introduction to Computers, Programs, and Java

Faculty of Information Technology - Computer Science Department 1


Outline
 Introduction

 What is a Computer?

 Computer Languages

 Interpreting/Compiling Source Code

 Java Programming Language

Faculty of Information Technology - Computer Science Department 2


Introduction

 This course is about programming. So, what is programming?

 The term programming means to create (or develop) software, which is also called a
program.

 The software (program) contains the instructions that tell a computer what to do.

 This course teaches you how to create programs by using the Java programming language.

 There are many programming languages, each language was invented for a specific purpose
—to build on the strengths of a previous language, for example, or to give the programmer a
new and unique set of tools.
Faculty of Information Technology - Computer Science Department 3
Introduction
 There are so many programming languages available, but there is no “best”
language.

 Each one has its own strengths and weaknesses, where one language might
work well in some situations, whereas a different language may be more
appropriate in other situations.

 If you learn to program using one language, you should find it easy to pick
up other languages.

 The key is to learn how to solve problems using a programming approach.

Faculty of Information Technology - Computer Science Department 4


Computer Languages
 You tell a computer what to do through programs.

 Without programs, a computer is an empty machine.

 Computers do not understand human languages, so you need to use computer


languages to communicate with them by converting all programs into the instructions
the computer can execute.

Faculty of Information Technology - Computer Science Department 5


Computer Languages

 Machine language is a set of primitive instructions built into


Machine Language
every computer.
Assembly Language
 The instructions are in the form of binary code, so you have to
High-Level Language
enter binary codes for various instructions.
 The program with native machine language is highly difficult to
read and modify.
 EX: to add two numbers, you might write an instruction in binary
like this: 1101101010011010

Faculty of Information Technology - Computer Science Department 6


Computer Languages
 Assembly languages this language is close to the machine language
and developed to provide better readable code.
Machine Language  Writing code in assembly language is easier than in machine
Assembly Language language. However, it is still tedious to write code in assembly
language.
High-Level Language  Since the computer cannot understand assembly language, a program
called an assembler is used to convert assembly language programs
into machine code.
 EX: to add two numbers, you might write an instruction in assembly
code like this: add 2, 3, result

Faculty of Information Technology - Computer Science Department 7


Computer Languages
 High-level languages are English-like and easy to learn and
Machine Language program.
Assembly Language  This type of language provides more readable and understandable
High-Level Language
code. (for example Java, C#, C++, …).
 The instructions in a high-level programming language are called
statements.
 EX: the following is a high-level language statement that computes
the area of a circle with radius 5: area = 5 * 5 * 3.1415;

Faculty of Information Technology - Computer Science Department 8


Computer Languages

Machine Language
Assembly Language
High-Level Language

Faculty of Information Technology - Computer Science Department 9


Interpreting/Compiling Source Code
 A program written in a high-level language is called a source program or source
code.
 A computer cannot understand a source program, a source program must be
translated into machine code for execution.
 The translation can be done using another programming tool called an interpreter or
a compiler.
 An interpreter reads one statement from the source code, translates it to the
machine code or virtual machine code, and then executes it right away, as shown in
Figure 1.4a.
 A compiler translates the entire source code into a machine-code file, and the
machine-code file is then executed, as shown in Figure 1.4b.

Faculty of Information Technology - Computer Science Department 10


Interpreting/Compiling Source Code

Faculty of Information Technology - Computer Science Department 11


Interpreting/Compiling Source Code
Example of Compiling Source Code in Java

Faculty of Information Technology - Computer Science Department 12


Java Programming Language
 Java is a powerful and multipurpose programming language for developing software
running on mobile devices, desktop computers, and servers.
 Java was developed by a team led by James Gosling at Sun Microsystems. Sun
Microsystems was purchased by Oracle in 2010.
 Computer languages have strict rules of usage. If you do not follow the rules when
writing a program, the computer will not be able to understand it.
 The Java language specification and the Java Application Program Interface
(API) define the Java standards.
 The Java language specification is a technical definition of the Java programming
language’s syntax and semantics.
 The API, also known as a library, contains predefined classes and interfaces for
developing Java programs.

Faculty of Information Technology - Computer Science Department 13


Java Programming Language
Applications of Java with Real-Word Examples

Faculty of Information Technology - Computer Science Department 14


Java Programming Language
 Java comes in three editions:

1. Java Standard Edition (Java SE) to develop client-side applications. The


applications can run standalone or as applets running from a Web browser.

2. Java Enterprise Edition (Java EE) to develop server-side applications, such as


Java servlets, Java Server Pages (JSP), and Java Server Faces (JSF).

3. Java Micro Edition (Java ME) to develop applications for mobile devices, such as
cell phones.

Faculty of Information Technology - Computer Science Department 15


List of Top Companies that Use Java

Faculty of Information Technology - Computer Science Department 16

You might also like