DOC PREVIEW
UVA CS 101 - Introduction Lecture Notes

This preview shows page 1-2-3-20-21-22-41-42-43 out of 43 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS 101-E: IntroductionAssumptionsDifferences with 101A bit of humor: Review of last timeComputing units of measureA marketing trickSoftwareA bit of humor: Input methodsTranslationJava translationTaskDisplayForecast.javaSample outputJava DocumentationGood CommentingBad commentingJava and the InternetEngineering softwareSoftware engineeringPrinciples of software engineeringA bit of humor: 1989 Computer AdvertisementObject-oriented designProgrammingSlide 24Problem SolvingSlide 26Slide 27Problem Solving ProcessSlide 29Slide 30Slide 31Slide 32Slide 33Slide 34Problem Solving MethodologiesSlide 36Slide 37TipsSlide 39Slide 40Slide 41Slide 42Slide 431CS 101-E: IntroductionAaron BloomfieldMEC 205MEC 215Clark G004 (really)2AssumptionsThe following is assumed for students in 101-EYou have taken a course-equivalent in programmingThus, you know the basics of programmingYou did not get a 4 or a 5 on the AP computer science exam (AB level)3Differences with 101Labs must be done by all 101-E students on their own timeIf you miss more than 2, you are subject to failureLabs due 8:30 p.m. on SundayLab session for 101-E students Sunday at 7 p.m.Pace through the textbook is the sameWe’ll go into more detail, thoughToday’s class will be a high-level overview4A bit of humor: Review of last time5Computing units of measureKilo (K) = 1,000 (thousand)Mega (M) = 1,000,000 (million)Giga (G) = 1,000,000,000 (billion)Tera (T) = 1,000,000,000,000 (trillion)= Kibi (Ki)= Mebi (Mi)= Gibi (Gi)= Tebi (Ti)Kilo = 210 = 1,024Mega = (1024)2 = 1,048,576Giga = (1024)3 = 1,073,741,824Tera = (1024)4 = 1,099,511,627,7766A marketing trickThis hard drive has 250,059,350,016 bytes=250.06 Gigabytes=232.89 GibibytesGuess which one they use to advertise the drive?7SoftwareProgramSequence of instruction that tells a computer what to doExecutionPerforming the instruction sequenceProgramming languageLanguage for writing instructions to a computerMajor flavorsMachine language or object codeAssembly languageHigh-levelProgram to which computer can responddirectly. Each instructionis a binary code thatcorresponds to anative instructionSymbolic languagefor coding machinelanguage instructionsDetailed knowledge ofthe machine is notrequired. Uses avocabulary andstructure closer to theproblem being solvedJava is a high-levelprogramminglanguageFor program to beexecuted it must betranslatedProgramSequence of instruction that tells a computer what to doExecutionPerforming the instruction sequenceProgramming languageLanguage for writing instructions to a computerMajor flavorsMachine language or object codeAssembly languageHigh-levelProgramSequence of instruction that tells a computer what to doExecutionPerforming the instruction sequenceProgramming languageLanguage for writing instructions to a computerMajor flavorsMachine language or object codeAssembly languageHigh-levelProgramSequence of instruction that tells a computer what to doExecutionPerforming the instruction sequenceProgramming languageLanguage for writing instructions to a computerMajor flavorsMachine language or object codeAssembly languageHigh-level8A bit of humor: Input methods9TranslationTranslatorAccepts a program written in a source language and translates it to a program in a target languageCompilerStandard name for a translator whose source language is a high-level languageInterpreterA translator that both translates and executes a source program10Java translationTwo-step processFirst stepTranslation from Java to bytecodesBytecodes are architecturally neutral object codeBytecodes are stored in a file with extension .classSecond stepAn interpreter translates the bytecodes into machine instructions and executes themInterpreter is known a Java Virtual Machine or JVM11TaskDisplay the forecastI think there is a world market for maybe five computers. Thomas Watson, IBM, 1943.12DisplayForecast.java// Authors: J. P. Cohoon and J. W. Davidson// Purpose: display a quotation in a console windowpublic class DisplayForecast { // method main(): application entry point public static void main(String[] args) { System.out.print("I think there is a world market for"); System.out.println(" maybe five computers."); System.out.println(" Thomas Watson, IBM, 1943.");}}Three statements make up the action of method main()Method main() is part of class DisplayForecastA method is a named piece of code that performs some action or implements a behaviorAn application program is required to have a public static void method named main().13Sample output14Java DocumentationFamiliarize yourself with the Java documentationIt will save you lots of time!15Good CommentingNecessary so others can re-use your codeAnd so the graders can understand it!A well commented program:// Authors: J. P. Cohoon and J. W. Davidson// Purpose: display a quotation in a console windowpublic class DisplayForecast { // method main(): application entry point public static void main(String[] args) { System.out.print("I think there is a world market for"); System.out.println(" maybe five computers."); System.out.println(" Thomas Watson, IBM, 1943.");}}16Bad commenting// Thomas J. Watson (February 17, 1874 - June 19, 1956) is// considered to be the founder of IBM. He was one of the// richest men of his time and called the world's greatest// salesman when he died.// Watson was born in Campbell, New York. His formal// education consisted of only a course in the Elmira// School of Commerce. His first job was at age 18 as// a bookkeeper in Clarence Risley's Market in Painted// Post, New York. Later he sold sewing machines and// musical instruments before joining the National Cash// Register Company as a salesman in Buffalo. He eventually// worked his way up to general sales manager. Bent on// inspiring the dispirited NCR sales force, Watson// introduced the motto, "THINK," which later became// a widely known symbol of IBM.// Although he is well known for his alleged 1943 statement: // "I think there is a world market for maybe five computers"// there is no evidence he ever made it. The author Kevin // Maney tried to find the origin of the quote. He has been // unable to locate any speeches or documents of Watson's// that contain this, nor is it present in any


View Full Document

UVA CS 101 - Introduction Lecture Notes

Documents in this Course
Classes

Classes

53 pages

Recursion

Recursion

15 pages

Iteration

Iteration

88 pages

PLEDGED

PLEDGED

6 pages

Objects

Objects

33 pages

PLEDGED

PLEDGED

11 pages

CS 101

CS 101

42 pages

Classes

Classes

83 pages

Iteration

Iteration

92 pages

Classes

Classes

186 pages

Classes

Classes

208 pages

Hardware

Hardware

21 pages

Arrays

Arrays

70 pages

Load more
Download Introduction Lecture Notes
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 Introduction Lecture Notes 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 Introduction Lecture Notes 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?