Chapter 1
Chapter 1
CHAPTER - 1
Introduction
Computer System
Hardware and software are two essential components of any computer system.
Hardware Software
Computer System
Hardware
The physical devices that make up a computer, such as the CPU,
motherboard, hard disk, keyboard, mouse, etc.
Software
A set of programs that run on a computer, such as the operating
system, applications, drivers, etc.
Computer System
Computer Program
A set of instructions that tells a computer what to do.
A sequence of steps that the computer follows to perform a task.
Written in programming languages.
Used to create all kinds of software, from operating systems and word
processors to games and web browsers.
Computer System
Programming language
A formal language that specifies a set of instructions that can be used to
produce various kinds of output.
A computer language programmers use to develop software programs,
scripts, or other sets of instructions for computers to execute.
Each programming language has its own syntax.
Computer System
Programming languages
Once a programmer learns the languages rules, syntax, and structure,
they write the source code in a text editor or IDE.
There are 1000+ programming languages.
The choice of programming language depends on the specific application
that is being developed, maintainability of the app , Scalability,
Performance and Security of the app.
Programming Languages
Classifications of Programming Languages
Programming paradigm
A style of programming that defines how code is written and structured.
There are many different programming paradigms, each with its own
strengths and weaknesses.
Programming Language Paradigms
Programming paradigm
Some of the most common programming paradigms include:
1. Procedural programming
2. Object-oriented programming
3. Functional programming
4. Logic programming
Programming Language Paradigms
1. Procedural programming
Procedural programming is the oldest and most basic programming
paradigm.
It is based on the idea of writing code as a series of procedures, or
functions, that each perform a specific task and can be called by other
procedures or by the main program.
Programming Language Paradigms
1. Procedural programming
Procedural programming follows a top-down approach, where the
program is divided into smaller subproblems that are solved by
procedures.
Example : C, Pascal, and Fortran.
Programming Language Paradigms
2. Object-oriented programming
Object-oriented programming (OOP) is a programming paradigm that
uses classes and objects to structure a software program.
Classes are blueprints that define the properties and methods of objects.
Objects are instances of classes that contain data and code.
OOP allows for creating reusable and modular code that can simplify
complex problems.
Example : Java, Smalltalk, ruby
Programming Language Paradigms
3. Functional programming
Functional programming is a programming paradigm that is based on the
idea of functions.
Functions are self-contained units of code that take inputs and produce
outputs.
Functional programming does not use side effects, which means that a
function's output does not depend on the state of the program outside of
the function.
Example : Haskell, Lisp, and Scala
Programming Language Paradigms
4. Logic programming
Logic programming is a programming paradigm that is based on the
principles of logic.
Logic programming languages use a declarative programming style.
The programmer specifies the desired output, rather than the steps that
need to be taken to produce the output.
Example : prolog
Object Oriented
Programming
Principles of object-oriented programming (OOP)
1. Encapsulation
The bundling of data and methods into a single unit called an object.
This allows for data to be hidden from the outside world, and for
methods to be accessed only through well-defined interfaces.
variable
method
class
Principles of object-oriented programming (OOP)
2. Abstraction
The process of hiding the implementation details of a class from its
users.
This allows users to focus on the functionality of the class, without
having to worry about how it works.
Hachalu
Person
First name Gidey
Last
name
Skill Minale
Job
Principles of object-oriented programming (OOP)
3. Inheritance
The ability of a class to inherit the properties and methods of another
class.
This allows for code reuse and for the creation of more complex classes
from simpler ones.
Principles of object-oriented programming (OOP)
4. Polymorphism
The ability of a single method to behave differently depending on the
type of object it is called on.
This allows for code to be written in a more general way, and for it to be
more reusable.
Java - Early history
Later the project went by the name Green and was finally renamed Java,
from Java coffee, a type of coffee from Indonesia.
Gosling designed Java with a C/C++-style syntax that system and
application programmers would find familiar.
Java 1.0
The Java platform has evolved over time to meet the needs of
developers.
In 2004, Sun released the Java Platform, Standard Edition 5 (Java SE 5),
which introduced a number of new features, including generics,
annotations, and autoboxing.
In 2009, Sun released Java SE 6, which added support for new features,
such as the NIO.2 API and the JavaFX toolkit.
In 2014, Oracle released Java SE 8, which introduced a number of new
features, such as lambda expressions, streams, and default methods.
Java platform evolution
One of the key advantages of using the JVM is that it allows developers
to write code in Java or other JVM-compatible languages and run it on
any platform that has a JVM installed, without having to worry about the
underlying hardware or operating system.
Some popular JVM languages include Java, Kotlin, Scala, and Groovy.
The JVM is widely used in enterprise software development, web
development, and mobile app development.
Java - JVM(Java Virtual Machine)
Java - JIT( Just-In-Time )
The speed of the Java code could theoretically approach that of a native
application if compiling every method did not require processing time
and memory use.
JIT compilation does use memory and the processor. The JVM calls
thousands of methods when it first starts up.
Even if the software eventually achieves extremely good peak
performance, compiling all of these techniques can greatly affect starting
time.
Java - JDK
4. JavaFX
a set of APIs for building rich, interactive user interfaces for
desktop, mobile, and web applications.
JavaFX is a newer technology than Java SE, Java EE, and Java
ME, but it is gaining popularity due to its powerful features and
ease of use.
Java - Editions
JavaFX Desktop, mobile, and web APIs for building rich, interactive user
developers interfaces
Adama Science and Technology University
School of Electrical Engineering And Computing