Duke CPS 006 - History of Programming

Unformatted text preview:

CompSci 62.1History of Programmingÿ Harvard Mark 1 1944, first automatic digital computer in US Grace Hopper - first programmer for Mark 1 Still at Harvardÿ ENIAC – Eckert and Mauchly 1946, University of Pennsylvania First useable computerCompSci 62.2Javaÿ Developed 1995 by Sun James Gosling and Patrick Naughtonÿ Simpler than C++ÿ Rich and LARGE libraryÿ Portable – runs on different platformsCompSci 62.3Compiling Javaÿ Compiler  Translator from high-level language (Java) to machine language (JVM – Java virtual machine) Patho Use editor to create source file (.java)o Compilero Join with class files and library fileso Result is code for JVM (a running program!)CompSci 62.4What can you do with Eclipse?ÿ Almost everything!ÿ Editorÿ Automatically compilesÿ Identifies syntax errorsÿ Runs programÿ Question: What is a logic error?CompSci 62.5What will we use Eclipse for inCompSci 6?ÿ Use to write complete java programs Access librariesÿ Use as an editor to write text files  README – gives info about the programÿ Use to write simple methods, then test with APTCompSci 62.6APT – Algorithmic Program Testingÿ Not a complete java program No main methodÿ Focus on and solve one small problemÿ Rich set of data for testingÿ Use Eclipse editor for APT, but cannot compile! Why? Then, again, you can set it up to compile …CompSci 62.7Java Types and Variablesÿ Every value has a type:int number = 6;String month = ”January”;FileStream infile;Color originalColor;CompSci 62.8Identifiersÿ Choose meaningful names for variables, methods and classesint x = 60; // what does x represent?int numberOfDays = 6;ÿ Follow rules for identifiersÿ Follow conventions for identifiersÿ What is the difference?CompSci 62.9Assignment Statementint numberOfDays;numberOfDays = 6;ÿ numberOfDays is “assigned” the value 6 We vocalize that as “gets”ÿ OR 6 is stored in memory location for numberOfDaysÿ Don’t say numberOfDays equals 6!CompSci 62.10Lab/Classworkÿ Get Eclipse Workingÿ Enter and run ”HelloCompSciClass”ÿ Modify the program to write out a paragraph or


View Full Document

Duke CPS 006 - History of Programming

Download History of Programming
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view History of Programming and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view History of Programming 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?