College of Science Department of Computer Programing Fundamentals (Java) First Stage
College of Science Department of Computer Programing Fundamentals (Java) First Stage
Department of Computer
Programing Fundamentals (Java)
First Stage
Prepared by:
Ari M. Saeed
2018 - 2019
JAVA
Outline
What is a computer?
Computer system
Computer Languages.
Java programming language
Java Development Process
The Java Platform
Creating Application in Microsoft Windows
Exercises
References.
3
What is a computer?
A programmable electronic device that perform
mathematical and logical operations at high speed.
4
Computer system
Computer system: consists of both hardware and software.
5
Computer Hardware
Hardware includes the..
• Input: keyboard, mouse, scanner, microphone.
• Processing: CPU executes the computer program.
• Output: monitor, printer and fax machine.
• Storage: hard drive, optical media and diskettes.
6
Computer system
2- Software: Is a collection of instructions that enable the
user to interact with a computer hardware, or perform tasks,
for example Java, Microsoft Word, and Media Player.
7
Computer Software
Computer systems divide software into two major groups:
8
Computer system
9
Computer Languages
Computer language: Is a series of words used to give
instructions to the computer, telling it what to do, how to do it
and when to do it.
10
Computer Languages
Two Basic Types of Computer Language:
1. Low-Level Languages.
2. High-Level Languages.
11
Low-Level Languages
Machine language: Is the only language that is directly
understood by the computer and it does not need to be
translated.
12
Translator
Is a program that translates a set of code written in one
programming language into a functional equivalent of the
code in another programming language.
Translator software:
• Assembler: Translates assembly language programs into
machine code (A binary code that a machine can
understand).
• Compiler: Translates high level language code into object
code. Example: C, C++.
• Interpreter: Analyses and executes a high-level language
program a line at a time. Execution will be slower than for
the equivalent compiled code as the source code is
analyzed line by line. Example: Python, Matlab.
13
Java programming language
It was originally developed by Sun Microsystems which was
initiated by James Gosling and released in 1995 as core
component of Sun Microsystems' Java platform (Java 1.0
[J2SE]).
The latest release of the Java Standard Edition is Java SE 8.
16
Java Development Process
• Java VM is available on many different operating systems.
• .class files are capable of running on Microsoft Windows,
the Solaris Operating System (Solaris OS), Linux, or Mac
OS.
17
The Java Platform
A platform is the hardware or software environment in which
a program runs. The Java platform differs from most other
platforms in that it's a software-only platform that runs on top
of other hardware-based platforms.
18
The Java Platform
The API and Java Virtual Machine insulate the program from
the underlying hardware.
19
Creating Application in Microsoft Windows
To write java program, it needs:
• The Java SE Development Kit 8 (JDK 8)
• A text editor
Textpad is simple editor included with the Windows
platforms.
class StudentApp {
public static void main(String[] args) {
System.out.println("First Application");//Display the string.
}
}
21
StudentApp application
The StudentApp application consists of three primary
components:
2-class
class StudentApp { 3-main method
public static void main(String[] args) {
23
References
http://java.sun.com/docs/books/tutorial
http://www.vogella.com
http://journals.ecs.soton.ac.uk/java/tutorial
24