L2cs2110fa09-6up - 20/08/2009 Announcements Assignment 1...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
20/08/2009 1 JAVA REVIEW Lecture 2 CS2110 Fall 2008 Announcements ± Assignment 1 has been posted ± Due Wednesday, September 9, 11:59pm. ² No partners on A1. (Groups of 2 allowed on A2-A5). ± Check that you are in CMS ± Materials available in CMS ± Report any problems to Bill Hogan, cs22110 administrative assistant (whh@cs.cornell.edu) Announcements ± It’s really a good idea to start on A1 and check CMS this week (well before the assignment is due) ± Sections start this week ± Section material will be useful for A1 ± Available help ± Consulting will start very soon—watch for announcements ± ± Check daily for announcements http://courses.cs.cornell.edu/cs2110 Newsgroup also worth watching Today — A Smorgasbord ± A brief (biased) history of programming languages ± Review of some Java/OOP concepts ± Java tips trick and pitfalls Java tips, trick, and pitfalls ± Debugging and experimentation Machine Language ± Used with the earliest electronic computers (1940s) ± Machines use vacuum tubes instead of transistors ± Programs are entered by setting switches or reading ± Example code ± 0110 0001 0000 0110 add reg1 6 ± An idea for improvement setting switches or reading punch cards ± All instructions are numbers ± Use words instead of numbers ± Result: Assembly Language Assembly Language ± Idea: Use a program (an assembler) to convert assembly language into machine code ± Early assemblers were some of the most complicated code of the time (1950s) ± Example code ADD R1 6 MOV R1 COST SET R1 0 JMP TOP ± Idea for improvement ± Let’s make it easier for humans by designing a high level computer language ± Result: high-level languages
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
20/08/2009 2 High-Level Language ± Idea: Use a program (a compiler or an interpreter ) to convert high-level code into machine code ± Pro ± The whole concept was initially controversial ± FORTRAN (mathematical FOR mula TRAN slating system) was designed with efficiency very much in mind ± Easier for humans to write, read, and maintain code ± Con ± The resulting program was usually less efficient than the best possible assembly-code ² Waste of memory ² Waste of time FORTRAN ± Initial version developed in 1957 by IBM ± Example code C SUM OF SQUARES ISUM = 0 DO 100 I=1,10 ISUM = ISUM + I*I 100 CONTINUE ± FORTRAN introduced many high-level language constructs still in use today ± ± Loops ± Conditionals ± Subroutines ± Comments ALGOL ± Sample code comment Sum of squares begin integer i, sum; ± ALGOL = ALGO rithmic L anguage ± Developed by an international committee ± First version in 1958 (not widely used) ± Second version in 1960 (become a major success) ± ALGOL 60 included recursion ± Pro: easier to design clear, succinct algorithms ± Con: too hard to implement; too inefficient for i:=1 until 10 do sum := sum + i*i; end COBOL ± COBOL = CO mmon B usiness O riented L anguage ± Developed by the US government (about 1960)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

L2cs2110fa09-6up - 20/08/2009 Announcements Assignment 1...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online