1 Purposes: Learn JAVA 1.What is programming languages 2.How to solve problems by computers 1.a CS major student, get a degree in BS 2.a programmer  system.

Slides:



Advertisements
Similar presentations
Designing a Program & the Java Programming Language
Advertisements

Etter/Ingber Engineering Problem Solving with C Fundamental Concepts Chapter 1 Engineering Problem Solving.
Programming Basic Concepts © Juhani Välimäki 2003.
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
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.
Program Flow Charting How to tackle the beginning stage a program design.
Program Flow Charting How to tackle the beginning stage a program design.
Copyright 2006 by Pearson Education 1 Building Java Programs Chapter 1: Introduction to Java Programming.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Objectives Machine language vs.. High-level language Procedure-oriented, object-oriented, and event- driven languages Background of Visual Basic VB Integrated.
Concept of Computer Programming November 2, 2011.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 1 – Introduction to Computers, the Internet, and the Web Outline 1.1 Introduction 1.2 What Is a.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
Chapter 1 Engineering Problem Solving 1. Hardware and Software 2 A computer is a machine designed to perform operations specified with a set of instructions.
9/12/2015IT 2751 IDE ( Integrated Development Environment ) 1.A customized plain text editor 2.Compiler 3.Loader 4.Debugging tool JDK (Java Development.
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming 1.
Algorithm development. The invention of the computer  Programming language developments: 1. Machine code 2. Assembler  easier to write, debug, and update.
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.
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Clement Allen, PhD Florida A&M University SUMMER 2006.
Visual C++ Programming: Concepts and Projects
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introduction to Computers Outline 1.1Introduction.
The Joy of Programming (also known as) Introduction to Object-Oriented Programming.
2-1 Hardware CPU Memory - 2 kinds Network Graphics Input and Output Devices.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
EG280 Computer Science for Engineers Fundamental Concepts Chapter 1.
Introduction to Computer Programming in c
1/16/2008ITK 1681 HardwareSoftware Theory 1800 AD  Architecture 1945 AD  What is Computer Science? Languages 1960 AD 
Computing Systems & Programming ECE Fundamental Concepts Chapter 1 Engineering Problem Solving.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
CS-303 Introduction to Programming
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
©2016 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. CSC 110 – INTRO TO COMPUTING - PROGRAMMING Overview of Programming.
Introduction to Computer and Programing Thanachat Thanomkulabut.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Software Engineering Algorithms, Compilers, & Lifecycle.
Basic Concepts: computer, program, programming …
Lecture 1b- Introduction
Engineering Problem Solving With C An Object Based Approach
CSCI-235 Micro-Computer Applications
Computer Programming.
Lecture 1: Introduction to JAVA
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Comp Sci 200 Programming I Jim Williams, PhD.
Introduction CSC 111.
IDE (Integrated Development Environment)
CS Programming I Jim Williams, PhD.
Computer Programming-1 CSC 111
System Programming By Prof.Naveed Zishan.
CS Programming I Jim Williams, PhD.
Presentation transcript:

1 Purposes: Learn JAVA 1.What is programming languages 2.How to solve problems by computers 1.a CS major student, get a degree in BS 2.a programmer  system manager  project leader 3.a computer scientist is worthwhile and doable. Being

2 HardwareSoftware Theory 1800 AD  Architecture 1945 AD  What is Computer Science? Languages 1960 AD 

3 Alan Turing ( ) – The Enigma The man who invented the computer Image from Turing Machines Turing Award: the Nobel Prize in CS

4 Said: “Turing Machines are human that compute.” “ In logic nothing is accidental ” Ludwig Wittgenstein ( ) Image from

5 Hardware Input deviceOutput device Central Processor Unit: Internal Storage Control Unit + Arithmetic-Logic Unit (ALU)

6 Software =16

7 A bit logical, Adder (half adder) 1 +) A B c S ABcS A B S c Adder ABAB

8 Full Adder CiCi A +)B CoCo S CiCi ABCoCo S A B S Co Full Adder Ci

9 4 bits Adder Full Adder Full Adder Full Adder Full Adder A B )

10 Logical Gates for an Adder (half adder) A +)B c S ABcS AND OR AND NOT B A S c Half-Adder

11 Software: 1.Operation systems 2.Applications XP, Unix, VAX Words Excel E.I. Hello Java Hello.java javac Hello.class (class loader) Eclipse, NetBean IDE, SunSun

12 IDE ( Integrated Development Environment ) 1.A customized plain text editor 2.Compiler 3.Loader 4.Debugging tool Java 2 Software Development Kit (J2SDK) Eclipse 1.notepad 2.javac hello.java 3.java hello

13 Solving a problems by computers = ? = sum1; sum1+2=sum2 sum2+3=sum3 sum3+4=sum4 sum4+5=sum5 sum5+6=sum sum = sum =1 1+2=3 3+3=6 6+4= = = =5050

14 Solving a problems by computers = sum1 sum1+2=sum2 sum2+3=sum3 sum3+4=sum4 sum4+5=sum5 sum5+6=sum sum = sum100 sum = 0 sum = sum+1 sum = sum+2 sum = sum+3 sum = sum +4 sum = sum sum = sum+100 computer can do the same thing again and again fast

15 Algorithm: a procedure of calculating (manipulate) data = ? sum = 0 sum = sum+1 sum = sum+2 sum = sum+3 sum = sum +4 sum = sum sum = sum+100 sum = 0; i = 1; while (i <= 100) do the following { sum = sum + i; i = i+1; } sum is the answer;

16 Graph Reachability G: (V,E) V: the set of vertices E: the set of edges V = {1,2,3,4,5,6,7} E = {(1,2), (1,3), (1,4) (3,6),(5,6), (5,7)} Is there a path from 1 to 6 in G? Is there a path from 1 to 7 in G?

17 Algorithm for Graph Reachability: Input G: (V,E), a,b; let S = {a}; mark a; while (s  {}) do the following select one element from S; let it be x; remove x from S; let N = { y : (x,y) in E }; if b in N, say “yes” and stop; mark every b in X; set S = S union N; say “no”; Is there a path from a to b in G? Java C++ C Fortran Fortran90 Lisp Ada COBOL BASIC Pascal Polog

18 Pr8oblems  Solutions cycle Problems System analyst, Project leader Algorithms Senior Programmers Programs in C++ (or any high level Programming Language) compiler Assembly Assembler Machine code linker Results Customers Programmers Syntax Semantics 95% (human) IDE 5% (computers)

19 Procedure vs Object To write a program is: To find a way to manipulate data -- We design procedures Procedure-Oriented Programming Statements + functions  programs To find data to manipulate – We choose data (object) Object-Oriented Programming Classes + Objects  programs (interfaces, methods, attributes…)

20 Classes: A class is a concept of something Vehicle 4 wheels, seat, engine, windows…… Truck ………… Sedan ………… SUV …………

21 Method & Attribute class: Method &Attribute Method: behaviors (operation, functionalities) Field (attribute): the properties the class

22 Objects Vehicle SUV Honda Pilot 011-JAV instantiation Class Object

23 A Java Program: // Fig. 2.1: Welcome1.java // Text-printing program. public class Welcome1 { // main method begins execution of Java application public static void main( String args[] ) { System.out.println( "Welcome to Java Programming!" ); } // end method main } // end class Welcome1 /********************************************************* *(C) Copyright by Deitel & Associates, Inc. and * * Prentice Hall. All Rights Reserved. * **********************************************************/