1 / 23

Comp 110 – Introduction to Programming

Comp 110 – Introduction to Programming. Instructor: Prasun Dewan. Prerequisites. None. Computer World. Theater Analogy. Play Concert Talk Speech Cooking Lessons Town Hall Meeting. Fetched from. Management. M anages. Theater. Performer. A ssists. Stagehand. Real. Trial.

ryder
Download Presentation

Comp 110 – Introduction to Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Comp 110 – Introduction to Programming Instructor: PrasunDewan

  2. Prerequisites • None

  3. Computer World

  4. Theater Analogy • Play • Concert • Talk • Speech • Cooking Lessons • Town Hall Meeting

  5. Fetched from Management Manages Theater Performer Assists Stagehand Real Trial Archive Theater World – Part 1 Written in Stored in Performance Language Performance Script Notebook or Teleprompter Follows Stage Performer Performs Audience

  6. Theater World – Part 2 Written in Performance Language Performance Script Writes entire script Speaks sentence Translator (Interpreter) Translator Reads entire script Hears sentence Written in Script Language Original Script

  7. Theater World – Part 3 Word Processor, Script Writer Translator / Interpreter, Stagehand, Performer Reference Material Checked by Links Syntax, Semantics, Logic, & Style Secretary Problems Typewriter, Text Editor Script Writer Written in Script Language Original Script Written by Uses

  8. Fetched from Operating System Manages Assists Runtime Real Debugging Disk, Tape Computer World – Part 1 Written in Stored in Machine Language Object Code Memory Follows Computer Processor Interacts with Users

  9. Computer World – Part 2 Written in Machine Language Object Code Writes entire source code Writes statement Interpreter Compiler Reads source code Reads statement Written in Programming Language Source Code

  10. Translating Using Both a Complier and An Interpreter Source Code Compiler Platform Independent Intermediate Code Interpreter Platform Specific Machine Code Processor

  11. Theater World – Part 3 Editor, Programmer, Translator, Operating System Runtime, Processor Libraries Checked by Links Syntax, Semantics, Logic, & Style Linker Problems Typewriter, Text Editor Programmer Written in Programming Language Source Code Written by Uses

  12. Computer vs. Theater

  13. Computer vs. Theater

  14. Computer vs. Theater • CPU is fast: can do several performances at one time. • CPU is dumb: no improvisation possible. • Machine language much lower-level than programming language.

  15. Why Java • Modern, modular (object-oriented) language. • Good Error Detection. • Rich Library Embodying Many Good Programming Principles • Can Write Teaching Tool (ObjectEditor)

  16. Java Versions, Dialects & Programming Enviromnet • JDK 1.5+ • Eclipse IDE Programming Environment • Will not matter

  17. Computer vs. Program Model Processor ? Program (source code) Compiler

  18. Theater Performer Structuring in Scripts Script Follows

  19. Structuring in Scripts Script Introduction Body Conclusion Script components are abstract. Paragraph 1 Paragraph 2 So are program components! Sentence 1 Sentence 2

  20. Computer vs. Program Model Processor ? Program (source code) Compiler

  21. Outline • Intuitive Explanation • Two Concrete Examples • Calculators • square • BMI • Basic Java program elements, programming styles, error handling • Running and interacting with a Java program

  22. Theater Performer Structuring in Scripts Script Follows

  23. Structuring in Scripts Script Introduction Body Conclusion Script components are abstract. Paragraph 1 Paragraph 2 So are program components! Sentence 1 Sentence 2 Next chapter discusses abstract program components

More Related