320 likes | 395 Views
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.
E N D
Computer Programming Neal Alfie Y. Lasta Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
Table of Contents • What’s it All About? • From your mind to the computer processor Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
I. What’s it all about? Word processing Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
I. What’s it all about? Slave Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
I. What’s it all about? The quick brown fox jumps over the lazy d Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
I. What’s it all about? Computer Program • Set of instructions telling computer what to do • ‘code’ 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
I. What’s it all about? Programmer! Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
I. What’s it all about? Gobs and gobs of code Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
I. What’s it all about? Important programmer qualities • They know how to break big problems into smaller step-by-step procedures • They can express these steps in a very precise language. 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? Visual Basic COBOL ISETL 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 Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
Compiler • Computers deal with Zeros and Ones Start = 01010011 01110100 01100001 01110010 01110100 Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
Compilation • Translated Computer Program into 0’s and 1’s Object Code Source 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 Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010 Bytecode file
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 Machine • Special Software Computer JVM bytecode Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
Java Virtual Machine 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 Interface • 1980s 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 Programming • Easy to reuse software + + Searches for single character Substitutes one letter for another Looks for blank spaces = 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 1995 1995 Present 250 programs More than 3000 programs Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
This library known as • Application Programming Interface (API) - All the things you can do with API programs - API is so extensive Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
API Documentation • Programmers look of API Features in online document called API Specification • A.k.a API Documentation, or Javadocs • Describes thousands of features in Java API • Daily basis consultation • Bookmark website Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010
Java Programming Toolset • Java Compiler • Java Virtual Machine • Java API • Java API Documentation • Also need: • Editor • A way to issue commands • Compile program • Run JVM Lasta NAY. Teaching Demo. MSU-IIT IDS. 5/14/2010