CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.

Slides:



Advertisements
Similar presentations
 Computer hardware components are the physical pieces of the computer.  The major hardware components of a computer are: – The central processing.
Advertisements

Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Introduction to Computers and Java Module 1. Objectives overview computer hardware and software introduce program design and object-oriented programming.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Introduction to Computer Programming CSC 1401: Introduction to Programming with Java Lecture 2 Wanda M. Kunkle.
Chapter 1: Introduction to Computers and Java
Introduction Algorithms and Programming. Computer Programming  A form of problem solving  Or, more accurately, a way to solve problems  What we will.
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.
COMP Computer Basics Yi Hong May 13, 2015.
1 I.Introduction to Algorithm and Programming Algoritma dan Pemrograman – Teknik Informatika UK Petra 2009.
CS102 Introduction to Computer Programming
Computer Programming-1 CSC 111 Chapter 1 : Introduction.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Chapter 1 Coding Introduction.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
© 2012 Pearson Education, Inc. All rights reserved. Starting Out with Java: From Control Structures through Data Structures Second Edition by Tony Gaddis.
Introduction to Java Lecture # Java History Green Team started by Sun Microsystems. *7 Handheld controller for multiple entertainment systems.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
High-level Languages.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
JAVA: An Introduction to Problem Solving & Programming, 7 th Ed. By Walter Savitch ISBN © 2015 Pearson Education, Inc., Upper Saddle River,
Introduction to Computers and Java Chapter 1.3. A Sip of Java: Outline History of the Java Language Applets A First Java Program Compiling a Java Program.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Chapter 1: Introduction to Computers and Java
Introduction to C++ Programming Language
Java Programming, Second Edition Chapter One Creating Your First Java Program.
CHAPTER 1 Introduction to Computers and Java Copyright © 2016 Pearson Education, Inc., Hoboken NJ.
Chapter 11 Introduction to Computers and Java Chapter 1.
Chapter 1 Section 1.1 Introduction to Java Slides prepared by Rose Williams, Binghamton University Kenrick Mock, University of Alaska Anchorage.
Introduction to Computers and Java Module 1. Objectives overview computer hardware and software introduce program design and object-oriented programming.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Java: From Control Structures through Objects Third Edition.
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
©2016 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. CSC 110 – INTRO TO COMPUTING - PROGRAMMING Overview of Programming.
Ch 1 - Introduction to Computers and Programming Hardware Terminology Main Memory Auxiliary Memory Drives Writing Algorithms Using Pseudocode Programming.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Chapter 1: Introduction to Computers and Java 1-2 Chapter Topics Chapter 1 discusses the following main topics: –Introduction –Why Program? –Computer.
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 Introduction to Computers and Java Copyright © 2016 Pearson Education, Ltd.
© 2012 Pearson Education, Inc. All rights reserved. Starting Out with Java: From Control Structures through Data Structures Second Edition by Tony Gaddis.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Chapter 1Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Chapter 1 l Background information »important regardless of programming.
Programming with Java. Chapter 1 Focuses on: –components of a computer –how those components interact –how computers store and manipulate information.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
Chapter 3 Getting Started. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To give an overview of the structure of a contemporary.
Chapter 1 Coding Introduction.
Java Programming: From the Ground Up
Lecture 1: Introduction to JAVA
Introduction to Computers and Java
Chapter 1: Introduction to Computers and Java
Java programming lecture one
Introduction to Computers and Java
Mobile Development Workshop
Introduction to Computers and Java
Introduction CSC 111.
Presentation transcript:

CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib

Computer Basics Section 1.1

Computer Systems Hardware ▫The Physical Machine Software ▫Set of programs  Set of instructions

Hardware and Memory Central Processing Unit (CPU) ▫Also known as the Processor ▫Device that performs the instructions in a program ▫Example  Intel Core i7

Hardware and Memory Memory ▫Holds data for the computer to process ▫Two forms  Main Memory  Volatile  Example - RAM  Auxiliary Memory  Non-volatile  Example – Hard drive

Bits, Bytes & Address Bit = Binary Digit (0,1) Byte = groups of bits ▫1 Byte = 8 Bits ▫Byte is the smallest addressable unit of memory Address ▫Main memory consists of a long list of numbered bytes ▫The number of a byte in memory is called an Address

Memory Locations 1 byte is not large enough to store all kinds of data Data can be stored in several adjacent bytes These adjacent bytes are considered a single Memory Location Address of the Memory Location ▫Address of the first byte

Main Memory

Files & Directories File ▫A group of bytes stored in auxiliary memory Directory ▫Also known as Folder ▫Contains groups of files

Programs A set of instructions

Operating Systems A program that supervises a computer’s operation Examples ▫Windows XP/7/8 ▫UNIX ▫Linux, Ubuntu ▫Mac OS X

Programming Languages High Level Languages ▫Java, C, C++, C#, Visual Basic, Python Low Level Languages ▫Assembly Language ▫Machine Language

Compilers A Translator Translates from High Level Language to Low Level Language Source code -> Object Code Compile Once, Execute Often

Interpreters Translator + Executor Alternates between translation & execution Translates every time Interpreted programs are slower than compiled ones

Java Bytecode An intermediate language for Java A compiler translated Java code into Bytecode Java Virtual Machine (JVM) ▫Translator to translate & execute Java Bytecode Bytecode runs in any computer that has JVM ▫Portability

Compiling & Running

Class Loader Java program consists of Classes ▫A piece of code ▫Generally reside in one file Class loader connects the Classes ▫Similar to a Linker

A Sip of Java Section 1.2

History of Java Started in 1991 James Gosling and his team ▫Sun Microsystems

Applications & Applets Applications ▫Regular programs ▫Runs in your computer Applets ▫Little applications ▫Runs in your web browser ▫Sent over the Internet

Programming Basics Section 1.3

Object-Oriented Programming Objects ▫Attributes ▫States ▫Behaviors Methods ▫Captures the behavior Classes ▫Blueprint for Objects

Object-Oriented Programming Encapsulation ▫Information Hiding Polymorphism ▫Many forms ▫Example – “Go play your favorite sport” Inheritance ▫Way of organizing Classes

Inheritance

Algorithms Like a Recipe! A set of directions for solving a problem Often written in Pseudocode ▫Combination of English & Programming Language

Pseudocode Example Algorithm to compute the total cost of a list of items ▫Write the number o on the whiteboard. ▫For each item on the list  Add the cost of the item to the number on the whiteboard  Replace the number on the whiteboard with the result of this addition. ▫Announce that the answer is the number written on the whiteboard.

Testing & Debugging Bug ▫A mistake in a program Debugging ▫Process of eliminating mistakes Syntax error ▫Grammatical mistakes Run-time error ▫Error during execution Logic error ▫Conceptual mistakes in algorithm

Software Reuse Java Class Library ▫Java API Example ▫System.out.println