Java Programming: From the Ground Up

Slides:



Advertisements
Similar presentations
Chapter 1 An Overview of Computers and Programming Languages.
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
 Computer hardware components are the physical pieces of the computer.  The major hardware components of a computer are: – The central processing.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Introduction to Computers and Python. What is a Computer? Computer- a device capable of performing computations and making logical decisions at speeds.
Computer Programming-1 CSC 111 Chapter 1 : Introduction.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Lecture 1 An Introduction to Computer, Programming and Java 1.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Chapter 1 An Overview of Computers and Programming Languages.
INTRODUCTION TO COMPUTER PROGRAMMING itc-314 LECTURE 01.
What is a Computer ? Computers are Electronic Machines that process (performs calculation and manipulation) Data under the control of Set of Instructions.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Introduction to Computers
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
Introduction to the Computer System. What is a computer ? A computer is an electronic device that can accept data and instruction, process them or store.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Introduction Lecture 01.
Introduction to Computer Systems and the Java Programming Language.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Computer Fundamentals MSCH 233 Lecture 1. What is a computer? A computer is an electronic machine which can accept data in a certain form, process the.
Chapter 1 An Overview of Computers and Programming Languages.
©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing.
CHAPTER 1 COMPUTER SCIENCE II. HISTORY OF COMPUTERS (1.1) Eniac- one of the worlds first computers Used more electricity than an entire city block of.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
1 Chapter 1 Background Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
CHAPTER 1 OVERVIEW OF COMPUTER AND PROGRAMMING 1.1 Electronic Computer Then and Now 1.2 Computer Hardware 1.3 Computer Software 1.4 The Software Development.
Chapter I: Introduction to Computer Science. Computer: is a machine that accepts input data, processes the data and creates output data. This is a specific-purpose.
COMPUTER HARDWARE & SOFTWARE INTRODUCTION TO LIBRARY & INFORMATION SCIENCES (5501) WORKSHOP SPRING 2013 By: Huma Malik Librarian, Preston University, Islamabad.
Chapter 1: Introduction to Computers and Programming
Computer Architecture and Number Systems
BASIC PROGRAMMING C SCP1103 (02)
Computer Science II Chapter 1.
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1 – Introduction to Computers, the Internet, and the Web
Topics Introduction Hardware and Software How Computers Store Data
Chapter 1: An Overview of Computers and Programming Languages
Lecture 1: Introduction to JAVA
BASIC PROGRAMMING C SCP1103 (02)
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Introduction to Programming
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Introduction to Computers
Chapter 1: Introduction to Computers and Programming
Computer Science I CSC 135.
Computer Electronic device Accepts data - input
Introduction to Computers
Born to be Programmer TeguhSutanto, M.Kom.
Topics Introduction Hardware and Software How Computers Store Data
Introduction CSC 111.
National Diploma in Computer Studies
Computer components is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format. Computer The computer.
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Java Programming: From the Ground Up Chapter 1 An Introduction to Computers and Java Slides produced by Antonio Martinez

What is a Computer? A computer is a machine that performs computations, logical operations, or more generally, data manipulation according to some prescribed sequence of instructions called a computer program. The physical components of a computer are termed hardware and the programs software.

The Hardware The major hardware components: The central processing unit (CPU)‏ Primary or random access memory (RAM)‏ Secondary or long term memory Input and output devices (I/O devices)‏

The Central Processing Unit The CPU does: the computing the processing the bulk of the work Important components of the CPU: arithmetic and logic unit (ALU)‏ control unit (CU)‏ clock

The Central Processing Unit The ALU performs calculations, billions per second The CU controls or coordinates which calculations the ALU performs The CPU clock determines how frequently the computer hardware executes instructions. A system’s hardware components are synchronized with the clock. Every time the clock ticks, another hardware action occurs.

Primary or Random Access Memory How Data is Stored binary format a sequence of 0’s and 1's called bits. ASCII encoding: ‘a’ is represented by 01100001 ‘b’ is encoded as 01100010 A sequence of eight bits is called a byte.

Where Data is Stored When the CPU executes a program, the program instructions, along with relevant data, are stored in primary memory. Primary memory is also known as random access memory (RAM) because data may be retrieved or accessed in random, rather than sequential, order.

Where Data Is Stored You can conceptualize RAM as a collection of storage cells or boxes, each capable of holding just a single byte of information. A unique number, or memory address, identifies each such storage cell.

Secondary Memory Long term Permanent storage Secondary memory devices: hard disks tapes CDs flash memory sticks.

Secondary Memory The programs that you use every day such as word processors, spreadsheets, and games are permanently stored on secondary storage devices. Compared to RAM, secondary memory is, in general, cheaper (per bit), slower, larger, electromechanical rather than electronic, and persistent: secondary memory devices do not lose their values when you turn off the computer.

Input/Output Devices Standard input devices: Output devices: keyboards mouses joysticks stylus pens cameras microphones Output devices: monitors printers speakers

The Software The programs that run on a computer are collectively known as software. Word processors, internet browsers, editors, database management systems, computer games, and spreadsheets are all part of your computer's software library. When you turn on or boot your computer, a program called the operating system automatically runs. This special program provides an interface between you and your computer.

Machine Language Each CPU executes instructions encoded in its own unique native machine language. A hypothetical instruction for adding one number to another might have the form: 10010010 00000001 00000001 10101101

Machine Language In the 1960s, the first high-level language, FORTRAN, was invented and no longer were programmers forced to devise programs with binary instructions. FORTRAN instructions use an English-like syntax. Today, hundreds of high-level languages are available, with dozens in mainstream use, including: Fortran 2003, COBOL, Lisp, Visual BASIC, C, C++, C#, Java, Perl, Python, PHP, and Javascript.

Machine Language A typical instruction coded in a high-level language: if income > 1000000 then print "You are rich!"

The Compiler The program must be translated into the machine language of that computer. Accepts a program written in a high-level language and produces a translation into the target machine language.

Java General-purpose language developed by Sun Microsystems in the early 1990s. Three main goals for their new language: Platform Independence - Java programs should be capable of running on any computer. Security - Java programs should not be susceptible to hackers' code and dangerous viruses. Reliability - Java programs should not "crash.”

The Java Virtual Machine In order to make Java a cross-platform programming language, Java's creative team designed an abstract computer implemented in software called the Java Virtual Machine (JVM). You install software on your computer that simulates a JVM computer. The machine language of the JVM is called bytecode. Java programs are first compiled into bytecode, and then executed.

The Java Virtual Machine The Java interpreter, which is part of the JVM, executes each bytecode instruction, one by one. Once a Java program is translated into bytecode, the bytecode can run on any computer that has installed the JVM. A Java program needs to be compiled into bytecode just once.

Programming and Algorithms An algorithm is a finite, step-by-step procedure for accomplishing some task or solving a problem. The study of algorithms is a cornerstone of computer science. A programming language is your tool, a tool that you can use to investigate and implement algorithms.