Programming Languages And
Environments
Objectives
• Programming languages
• Machine language
• Assembly language
• High-Level language
• Java Background
• Java language Specification, API, JDK and IDE
• Sample java Program
Announcements
• Google Classroom
u43sdci
• Email : [email protected]
Consultation Hours
• Friday – 13:30 to 16:30
Recap
• Computer Basic
• Keyboard, Mouse, Windows 10 Environment, CMD, Save
As, Save, Binary code
• Computer Programs, Operation System
Programming Languages
• Computers do not understand human languages
• Programs must be written in a language a computer can use.
• There are hundreds of programming languages, and they were
developed to make the programming process easier for people.
Programming Languages
• Machine Language
• Assembly Language
• High-Level Language
Machine Language
• Computer’s native Language and it is machine dependent
• Instructions are in form of binary code and they are
interpreted directly by the hardware
• Very difficult to read and modify
• E.g. to add two numbers you may write
1101101010011010
Assembly Language
• Uses short descriptive word (mnemonic - ADD, SUB, DIV, JMP, MOV,
HALT, GO) to represent each machine-language instruction
• Uses Assembler to translate assembly language programs into
machine code
• Assembly language is referred to as low-level language
• It is close in nature to machine language and is machine
dependent
• E.g. to add two numbers you could write
add 2, 3 , result
Assembly Language
• Assembler: Computer program that interprets software programs
written in assembly language into machine language, code and
instructions that can be executed by a computer.
High-Level Language
• They are platform independent - can be written and run on any
machine
• High-level languages are English-like and easy to learn and use
• Instructions in High-Level Language are called statements
• E.g. to add two number
sum = 2+3
• Program written in high-level language is called source program or
source code
• Uses interpreter or compiler to translate into machine code for
execution
High-Level Language
• Interpreter - reads one statement from the source code, translates it
to the machine code or virtual machine code, and then executes it
right away
• Compiler - translates entire source code into machine code file -
machine file is then executed
Java Background
• https://www.oracle.com/technetwork/java/javase/overview/javahistory
-index-198355.html
• Java was developed by a team led by James Gosling at Sun Microsystems.
• Sun Microsystems was purchased by Oracle in 2010
• Java is simple, object oriented, distributed, interpreted, robust, secure,
architecture neutral, portable, high performance, multithreaded, and
dynamic. https://www.tutorialspoint.com/What-are-the-major-features-of-
Java-programming
• Today, it is employed not only for Web programming but also for
developing standalone applications across platforms on servers, desktop
computers, and mobile devices.
Java language Specification, API, JDK and IDE
• Java syntax is defined in the Java language specification, and the
Java library is defined in the Java API.
• The application program interface (API), also known as library, contains
predefined classes and interfaces for developing Java programs
• The JDK is the software for developing and running Java programs.
• The JDK consists of a set of separate programs, each invoked from a command
line, for developing and testing Java programs
• An IDE is an integrated development environment for rapidly
developing programs
Java language Specification, API, JDK and IDE
Java comes in three editions:
• Java Standard Edition (Java SE) to develop client-side applications.
The applications can run standalone or as applets running from a
Web browser.
• Java Enterprise Edition (Java EE) to develop server-side applications,
such as Java servlets, JavaServer Pages (JSP), and JavaServer Faces
(JSF).
• Java Micro Edition (Java ME) to develop applications for mobile
devices, such as cell phones.
Java language Specification, API, JDK and IDE
• This course uses Java SE to introduce computer programming.
• Java SE is the foundation upon which all other Java technology is
based.
• There are many versions of Java SE. Oracle releases each version
with a Java Development Toolkit(JDK).
• For this course we will stick to Java SE 8
• For Java SE 8, the Java Development Toolkit is called JDK 1.8 (also
known as Java 8 or JDK 8).
Sample Java Program
1. public class Welcome {
2 public static void main(String[] args) {
3 // Display message Welcome to Java! on the console
4 System.out.println("Welcome to Java!");
5 }
6}
Special Characters
Activity 1
• Explain how an assembler and a compiler works.
• What is the difference between an interpreted language and a compiled
language?
• What is a source program?
• Come up with a brief description of 5 high level programming languages.
On each language specify the owner, purpose, how it is supported, pros
and cons, and the learning curve.
Resources
•Liang – Chapter 1
•https://www.oracle.com/technetwork/java/jav
ase/overview/javahistory-index-198355.html
•https://www.tutorialspoint.com/What-are-the-
major-features-of-Java-programming
•https://hackr.io/blog/features-of-java