Computer Programming

Post on 24-Feb-2016

46 views 1 download

description

Computer Programming. Neal Alfie Y. Lasta. Table of Contents. What’s it All About? From your mind to the computer processor. I. What’s it all about?. Word processing. I. What’s it all about?. Slave. I. What’s it all about?. The quick brown fox jumps over the lazy d. - PowerPoint PPT Presentation

Transcript of Computer Programming

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Computer ProgrammingNeal Alfie Y. Lasta

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Table of ContentsI. What’s it All About?II. From your mind to the computer

processor

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Word processingI. What’s it all about?

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

SlaveI. What’s it all about?

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

The quick brown fox jumps over the lazy d

I. What’s it all about?

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Computer ProgramSet of instructions telling

computer what to do‘code’

I. What’s it all about?

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

I. What’s it all about?

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

I. What’s it all about?

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Programmer!I. What’s it all about?

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Gobs and gobs of codeI. What’s it all about?

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Important programmer qualitiesThey know how to break big

problems into smaller step-by-step procedures

They can express these steps in a very precise language.

I. What’s it all about?

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Computer Programming

Language for writing steps

Java C C++

I. What’s it all about?

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Visual Basic

COBOL

ISETL

I. What’s it all about?

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

II. From your mind to the computer processor

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

3 important tools

Compiler VirtualMachine

ApplicationProgrammin

gInterface

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

CompilerComputers deal with Zeros and

Ones

Start = 01010011 01110100 01100001 01110010 01110100

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

CompilationTranslated Computer Program

into 0’s and 1’s

Source Code

Object Code

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Relationship

Write Source Code

Create Object Code

Special Software tool - Compiler

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Relationship

Computer’s hard drive -- > Javac or javac.exe

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Virtual Machine

They’re just talking Gibberish! (-:

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Computer “thinks” the thoughts

Bytecode file

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

How Java does it

“Do What it Says to Do in the Bytecode File”

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Java Virtual MachineSpecial Software

Computer JVM bytecode

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Java Virtual Machine

Run •Java Program in computer

JVM •Java Virtual Machine

Examine •Bytecode, and carries

out instructions

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

2 ways to run computer program

(a) Computer runs some object code

(b) Computer runs JVM, JVM follows bytecodes instructions

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Application Programming Interface1980s

Word processing machines firm

Write

Search-and-replace program

Spell checker program

Another search-and-replace

Another spell checker

A better search-and-replace….

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Holy Grail of ProgrammingEasy to reuse software

Searches for single character

Looks for blank spaces

Substitutes one letter for another

+ +

= Search and Replace Program

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Adding new feature?Just Reassemble pieces in

different way◦-Sensible◦-Cost Efficient◦- Much more Fun!

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Java came along in 19951995 Present

250 programs More than 3000 programs

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

This library known asApplication Programming

Interface (API)API

Useful

Formidable

- All the things you can do with API programs

- API is so extensive

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

API DocumentationProgrammers look of API Features in

online document called API Specification

A.k.a API Documentation, or JavadocsDescribes thousands of features in

Java APIDaily basis consultationBookmark website

Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010

Java Programming ToolsetJava CompilerJava Virtual MachineJava APIJava API Documentation

Also need: ◦Editor◦A way to issue commands

Compile program Run JVM