cisc 124 introduction to computing science ii
play

CISC 124: Introduction To Computing Science II instructor: Margaret - PowerPoint PPT Presentation

CISC 124: Introduction To Computing Science II instructor: Margaret Lamb course web site: www.cs.queensu.ca/home/cisc124 office : Goodwin 554 office hour this week : Monday 12-1 Wednesday 2-3 Friday 1-2 vote on Moodle for office hours for rest


  1. CISC 124: Introduction To Computing Science II instructor: Margaret Lamb course web site: www.cs.queensu.ca/home/cisc124 office : Goodwin 554 office hour this week : Monday 12-1 Wednesday 2-3 Friday 1-2 vote on Moodle for office hours for rest of term CISC 124, winter 2014, set 1: introduction 1

  2. Moodle vs. Web Site Web site on CISC server: http://cs.queensu.ca/home/cisc124/ index_w14.html Option 1: • Read web site for basic information (content/admin) • Go to Moodle for extras (forums, etc.) Option 2: • Use Moodle as front page (links to everything in web page) CISC 124, winter 2014, set 1: introduction 2

  3. Reading Assignment For Wednesday Read administrative info on web site. Pay special attention to syllabus & bring questions to class on Wednesday. Look at schedule, tell me about any problems with quiz dates CISC 124, winter 2014, set 1: introduction 3

  4. Reading Assignment For Friday Chapters 1-3 of the Java text. See web site for sections you may skip. Complete Moodle survey about the reading by noon on Friday. I expect you to: • Do readings as assigned. • Complete surveys to tell me your reactions. CISC 124, winter 2014, set 1: introduction 4

  5. Marking Scheme quizzes (best 3 of 4): 50% final exam: 34% assignments (best 7 of 8): 10% participation: 6% (questionnaires, forums, in-class activities) You must pass quizzes+final exam to pass the course. CISC 124, winter 2014, set 1: introduction 5

  6. Academic Integrity • Everything you hand in must be your own work (assignments, quizzes, final) • Exception: may do assignments in group (2-4 students), all names must be on submission • Why? • It's only fair! • Queen's reputation, value of degrees CISC 124, winter 2014, set 1: introduction 6

  7. What's This Course About? • Gaining more programming experience • Learning about Object-Oriented Programming (OOP) Language used: Java CISC 124, winter 2014, set 1: introduction 7

  8. A Brief History of Java Predecessors: • CPL, BCPL (1960s) • B (1969) • C (early 1970s) • C++ (1980s, object-oriented) Java: • Sun Microsystems (now part of Oracle) • first public version 1995 • design team led by Jim Gosling (Canadian!) • initial target: embedded systems • goals included: portability & reliability • 1994: World Wide Web! CISC 124, winter 2014, set 1: introduction 8

  9. Computer Languages & Translation Computers speak machine language – binary codes for very simple operations. Very cumbersome for humans to read and write! No standard: every make/model has its own language. Assembly Language: • Symbolic form of machine language • Easier for humans to handle • Simple program ("assembler") translates to machine language • Still involves a lot of detail • Still machine-dependent CISC 124, winter 2014, set 1: introduction 9

  10. High-Level Languages Idea: Languages that are closer to the way we think: logic, data types, mathematical notation Advantages: • Easier/faster to read & write • Can be translated into different machine languages Disadvantages: • Needs a complicated translation program • Not always completely portable – depends on language design and translation programs CISC 124, winter 2014, set 1: introduction 10

  11. Translation Methods • Interpreter (Python, Basic) • Compiler (C, C++) • Hybrid Approach (Java) CISC 124, winter 2014, set 1: introduction 11

  12. Interpreter Reads & executes a program in a high-level language. • Read a line or statement • Figure out what it means • Make it happen • Repeat! Python Python output of Program Interpreter program input to program CISC 124, winter 2014, set 1: introduction 12

  13. Compiler Reads a program in a high-level language. Creates an equivalent program in machine language. Step 1: machine C C language Program Compiler program Step 2: machine input to output of language program program program CISC 124, winter 2014, set 1: introduction 13

  14. Pros & Cons Need For Extra Program: • Compiler: Program is compiled once. You don't need the compiler to run the program. • Interpreter: You need the interpreter each time you run the program. Efficiency: Interpreted languages traditionally viewed as less efficient. Changing with clever new technology ("just in time" compilation). Portability: • Compilers: You need to write a compiler for every "platform" (hardware & OS) • Interpreters: Not always necessary Both: Great care is needed to make a language truly portable (same results on all kinds of computers) CISC 124, winter 2014, set 1: introduction 14

  15. Java's Hybrid Approach JVM = Java Virtual Machine A hypothetical computer "Bytecode": the machine language of the JVM. Designed to suit the Java language, still pretty low-level. Step 1: (once) Java Program Java bytecode program (.java) Compiler (.class) Step 2: (every time you run the program) bytecode program Java Program Output (.class) Interpreter Program Input CISC 124, winter 2014, set 1: introduction 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend