Introduction to Computers and Java

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
Chapter 1 - An Introduction to Computers and Problem Solving
Introduction to Computers and Java Objects
Lecture 1: Intro to Computers Yoni Fridman 6/28/01 6/28/01.
Chapter 1- Visual Basic Schneider 1 Chapter 1 An Introduction to Computers and Visual Basic.
ICS 102 Computer Programming University of Hail College of Computer Science & Engineering Computer Science and Software Engineering Department.
Introduction Algorithms and Programming. Computer Programming  A form of problem solving  Or, more accurately, a way to solve problems  What we will.
Objectives Machine language vs.. High-level language Procedure-oriented, object-oriented, and event- driven languages Background of Visual Basic VB Integrated.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Introduction to Computers and Programming
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Lesson 4 Computer Software
CS102 Introduction to Computer Programming
1 Chapter-01 Introduction to Computers and C++ Programming.
Lecturer: Dr. AJ Bieszczad Chapter 1 COMP 150: Introduction to Object-Oriented Programming 1-1 l Background information »important regardless of programming.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
CSE:141 Introduction to Programming Faculty of Computer Science, IBA BS-I (Spring 2010) Lecture 3.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
Chapter 1Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Chapter 1 l Background information »important regardless of 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 1Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Java Byte Code l The Java compiler generates Java Byte Code. (Most.
Visual C++ Programming: Concepts and Projects
Chapter 1Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Chapter 1 l Background information »important regardless of programming.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 Overview 1.1 Computer Systems 1.2 Programming and Problem Solving.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
1 MIS 131 Introduction to Algorithms and Programming 2015/2016 Fall - Chapter 1 -
110-A1 Central Processing Unit Main Memory Monitor Disk Keyboard mouse What's a Computer? Network CPU: (stupid) brain of the computer can do very simple.
Internal Lab Registeration labreg/lab/signup.aspxhttp:// labreg/lab/signup.aspx
Beginning Snapshots Chapter 0. C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
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.
The Big Picture. My Story  Wrote great programs  Didn’t understand how they worked.
Chapter 1Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Chapter 1 l Background information »important regardless of programming.
Introduction to Computers and Programming
Chapter 1: Introduction to Computers and Programming
Computer Basics Computer system: hardware + software
Computer Basics.
What Do Computers Do? A computer system is
Unit 2 Technology Systems
Outline Introduction What Is a Computer? Computer Organization
Programming Language Hierarchy, Phases of a Java Program
CSCI-235 Micro-Computer Applications
Key Ideas from day 1 slides
hardware bits and bytes Java
Lecture 1: Introduction to JAVA
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
An Introduction to Computers and Visual Basic
Computer System and Programming
CS101 Introduction to Computing Lecture 19 Programming Languages
Getting Started Chapter 1 Copyright © 2000 W. W. Norton & Company.
INTRODUCTION TO OOP Objective:
Introduction CSE 1310 – Introduction to Computers and Programming
An Introduction to Computers and Visual Basic
Computer Science I CSC 135.
Computers: Hardware and Software
Introduction CSC 111.
Introduction to Computer Software
Outline Introduction What Is a Computer? Computer Organization
An Introduction to Computers and Visual Basic
Introduction to Java Brief history of Java Sample Java Program
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Introduction to Computers and Java Week 1 Introduction to Computers and Java Background information important regardless of programming language Introduction to Java

Computer Basics Computer system: hardware + software Hardware: the physical components Software: the instructions that tell the hardware what to do

Common Hardware Components Processor (CPU) Central Processing Unit Interprets and executes the instructions Memory main & auxiliary holds data and instructions Input device(s) mouse, keyboard, etc. Output device(s) video display, printer, etc. CPU and memory are physically housed together Standard Hardware Organization Memory (main & auxiliary) Input Devices (such as mouse and keyboard) Processor (CPU) Output Devices (such as video display or printer)

Physical Organization Keyboard Monitor Chassis CPU memory disk drives I/O connectors etc.

(input for the program) Running a Program Program—a set of instructions for a computer to follow Program Computer Data (input for the program) Output

Many Types of Programs User-created applications Existing applications word-processor/editor web browser compiler or assembler etc. Operating System DOS, Microsoft Windows, MacOS, Linux, UNIX, etc.

Various Types of User Interfaces Command-line type in key words and letters DOS, Linux, and UNIX Menu parts of DOS and Windows GUI (Graphical User Interface) click on icon also called “event-driven” MacOS, Windows

Programming Language Hierarchy

The highs and lows of programming languages ... High-Level Language (HLL) closest to natural language words, numbers, and math symbols not directly understood by hardware “portable” source code (hardware independent) Java, C, C++, COBOL, FORTRAN, BASIC, Lisp, Ada, etc. Machine Language (lowest level) least natural language for humans, most natural language for hardware just 0s and 1s directly understood by hardware not portable (hardware dependent)

Assembly Language (middle level) a more or less human readable version of machine language words, abbreviations, letters and numbers replace 0s and 1s easily translated from human readable to machine executable code like machine code, not portable (hardware dependent)

Object-Oriented Programming: OOP A design and programming technique Some terminology: object - usually a person, place or thing (a noun) method - an action performed by an object (a verb) type or class - a category of similar objects (such as automobiles) Objects have both data and methods Objects of the same class have the same data elements and methods Objects send and receive messages to invoke actions

Example of an Object Class Class: Automobile Data Items: manufacturer’s name model name year made color number of doors size of engine odometer miles miles per gallon Methods: Define data items (specify manufacturer’s name, model, year, etc.) Change a data item (color, engine, etc.) Display data items Calculate cost Calculate mpg

Inheritance Inheritance—a way of organizing classes Term comes from inheritance of traits like eye color, hair color, and so on. Classes with properties in common can be grouped so that their common properties are only defined once.

An Inheritance Hierarchy Vehicle Automobile Motorcycle Bus Sedan Sports Car School Bus Luxury Bus What properties does each vehicle inherit from the types of vehicles above it in the diagram?

Algorithms Algorithm - a set of instructions (steps) for solving a problem. must be precise must be complete May be in a number of different formats natural language (such as English) a specific programming language a diagram, such as a flow chart pseudocode - a mix of natural and programming language

Example of an Algorithm Algorithm that determines the total cost of a list of items: 1. Write the number 0 on the blackboard. 2. Do the following for each item on the list: --Add the cost of the item to the number on the blackboard. --Replace the old number on the board by this sum. 3. Announce that the answer is the number written on the board

Testing and Debugging Even with careful programming, your code could still contain errors and must be thoroughly tested. Bug—a mistake in a program Debugging—finding mistakes in a program and (possibly) fixing them

The Java Programming Language History 1991 - James Gosling, Sun Microsystems, Inc. originally a language for programming home appliances later (1994) used for World Wide Web applications (since byte code can be downloaded and run without compiling it) eventually used as a general-purpose programming language (for the same reason as above plus it is object-oriented) Why the name “Java”? Not sure - it may just be a name that came during a coffee break and it had not been copyrighted, yet.

Applets vs. Java Applications Java programs intended to be downloaded via the Web and run immediately “little applications” requires a web browser Applications Java programs intended to be installed then run often larger applications Slightly different programming for each, but both are easy to do