Скачать презентацию CIS 260 App Dev I IT and Скачать презентацию CIS 260 App Dev I IT and

faf8c0b011f39e2d745db3c9599c7ecb.ppt

  • Количество слайдов: 22

CIS 260: App Dev I CIS 260: App Dev I

IT and Computer Systems n Important changes in information technology (IT) – Newspapers WWW IT and Computer Systems n Important changes in information technology (IT) – Newspapers WWW – Snail mail email – Typewriter _______ – Brick & mortar e-commerce n Two major components of a computer system: – Hardware: run by software – Software: created/used by people 2

History of Computers n See http: //sunsethigh. dade. k 12. fl. us/sunset/history/index. htm n History of Computers n See http: //sunsethigh. dade. k 12. fl. us/sunset/history/index. htm n for a good history. A brief history: – 1950 s: emergence of mainframes – 1960 s: widespread use of mainframes – 1970 s: widespread use of minicomputers – 1980 s: ____ become popular – 1990 s: notebooks, Internet become popular – 2000 s: E-commerce, wireless become 3 popular

Tasks Performed by Computers n Input – Human (e. g. , keypunch, mouse) – Tasks Performed by Computers n Input – Human (e. g. , keypunch, mouse) – Automated (e. g. , barcode, RFID) n Output – Human readable – Non-human readable n Storage – Primary – Secondary n Operations – Arithmetic – ______ 4

Hardware n CPU – Control unit, arithmetic logic unit, instruction register, program counter n Hardware n CPU – Control unit, arithmetic logic unit, instruction register, program counter n Main memory – – n Memory cells with addresses RAM, ROM Holds programs and data Volatile _____ storage – Hard disk, floppy disk, CD-ROM, flash drive n I/O – Input: keyboard, mouse, screen, scanner – Output: printer, monitor, speaker 5

Software n System programs – Operating system • Windows Explorer • Control Panel n Software n System programs – Operating system • Windows Explorer • Control Panel n Application programs – – Word processor Spreadsheet Internet browser ERP (_____ resource planning) – Games 6

Computer Languages n Signals – Analog: changes are continuous (audio tape) – _______: changes Computer Languages n Signals – Analog: changes are continuous (audio tape) – _______: changes are discrete, on/off (music CD) n Computer codes – Binary digit (bit): a 0 or 1 (off/on), base 2 – Byte: 8 _____ (00000001, 00000010, …) – ASCII code: 128 characters (27), nearly a byte – EBCDIC: 256 characters (28), one byte – Unicode: 65, 536 characters (216), two bytes 7

Programming Languages n Machine languages – instructions in codes with 0 s and 1 Programming Languages n Machine languages – instructions in codes with 0 s and 1 s – Depends on type of CPU – Codes used for memory locations, operations n Assembly languages – ______ used for instructions – 100100 means LOAD, 100101 means ADD – Assembler translates AL to ML n High-level languages (C, C++, Java) – Compiler converts Java to bytecode – ____ (JVM) converts bytecode to ML 8

Processing a Java Program n Programmer creates ______ code in an editor – Type Processing a Java Program n Programmer creates ______ code in an editor – Type the Java code as a text file – Save the text file as . java n Compile the source code into _____ – Source code MUST follow Java syntax – Compiler creates the bytecode in . class n Link the bytecode to other programs – The Java library contains additional programs – A linker links your bytecode to create executable code n Run the executable program – Loader loads executable into main memory – _____ translates executable code into ML 9

Programming Process n Java Integrated Development Environments (IDE’s) – – n Forte JBuilder Net. Programming Process n Java Integrated Development Environments (IDE’s) – – n Forte JBuilder Net. Beans Blue. J Programming Aids – Flowcharts: graphic – ______: textual, non-executable 10

Programming Methodologies n Structured programming – Divide a problem into procedures – Use basic Programming Methodologies n Structured programming – Divide a problem into procedures – Use basic programming structures • Sequence: do A, do B, do C, … • Selection: if…then • Loop: automated repetition n ____-oriented programming (OOP) – Represent a problem as interacting objects – Determine the objects’ attributes – Determine the objects’ behaviors 11

Introduction to Java n n n Java was created in 1996 by _______. JDK Introduction to Java n n n Java was created in 1996 by _______. JDK is the Java _____, where “JDK” stands for _____ Development Kit. Java syntax is similar to that of _______. Java was designed to run on any computer _____ (i. e. , combination of operating system and microprocessor). Java applications run slightly _______ than most others. Java handles internal memory overhead 12 _______.

Applications, Applets, & Servlets n n Java can be used to create ______ that Applications, Applets, & Servlets n n Java can be used to create ______ that often have a GUI (_____ user interface). Java can be used to create web-based applications called _____. A Java server-side application is called a _____. You can copy the applications from the text CD by running the 13 OO_Java_Source_Code. zip file.

How Java Compiles & Interprets n n You can use a text ____ to How Java Compiles & Interprets n n You can use a text ____ to create Java ____ code (. java file extension). The Java _____ converts the source code into Java _____. A platform that has a Java _____ (a. k. a. a Java _______ machine or JVM) can translate the bytecodes into the processor’s (machine) language. A web browser with a Java interpreter can download and run Java ____. 14

Installing the JDK n Using the CD that comes with the text, – Simply Installing the JDK n Using the CD that comes with the text, – Simply navigate to the Java folder (in the Software folder), double-click the. exe file. – Follow the prompts. n Using the www. java. sun. com web site, – Select the download link for Java SE (Standard Edition). – Download (can take a long time and can contain errors). – Run the. exe file and follow the prompts. 15

Directories & Files of the SDK n In the c: jdk 1. 6. x Directories & Files of the SDK n In the c: jdk 1. 6. x directory, – bin contains the Java _____ and other necessary tools for developing and testing – demo contains sample applications and ____ – include contains header files for using ____ code in Java applications – jre contains the Java _____ or Java Runtime Environment – lib contains libraries and support files – doc contains _______ 16

To Configure Windows n n Select Start, Settings, Control Panel. Select System, Advanced tab, To Configure Windows n n Select Start, Settings, Control Panel. Select System, Advanced tab, and Environment Variables button). Select Path under System variables, Edit… At the end of the current path, enter a “; ” and add c: jk 1. 6. xbin (replace x with the current #) n If the system has a classpath variable, add “; . ; ” at the end. 17

Creating a Java Program n n Run Notepad (Start, Programs, Accessories, Notepad). Enter Java Creating a Java Program n n Run Notepad (Start, Programs, Accessories, Notepad). Enter Java code (exactly), such as public class My. First. Java. Program { public static void main( String[ ] args ) { System. out. println(“Hello world!”); } } n n Remember!!! Java is ______-sensitive. Save the file as “My. First. Java. Program. java”, say, in a folder called “first” on the a: drive (use the quotes on the file name). 18

Compiling and Running n n Run the Command Prompt (Start, Programs, Accessories, Command Prompt). Compiling and Running n n Run the Command Prompt (Start, Programs, Accessories, Command Prompt). To ____, at the C: > prompt, enter the following: a: javac firstMy. First. Java. Program. java n To _____, at the A: > prompt, enter the following: cdfirst java My. First. Java. Program 19

Errors n n n You may get compile-time errors or runtime errors. The JDK Errors n n n You may get compile-time errors or runtime errors. The JDK will provide the line _______ of the error, a description, and the actual code that is in error. You will need to go back to _____ to correct the errors, recompile, and rerun. 20

Creating a Java File w/ Text. Pad n n Text. Pad is a text Creating a Java File w/ Text. Pad n n Text. Pad is a text _______ designed for Java. To install Text. Pad go to http: //www. textpad. com/download/index. html#downloads and select English, FTP (USA) n To run Text. Pad… – click Start, Programs, Text. Pad n To create a Java program… – – enter Java code select File, Save As… enter the file name (matches the class name) select Java as file type, OK. 21

To Compile and Run w/ Text. Pad n To compile… – Select Tools, Compile To Compile and Run w/ Text. Pad n To compile… – Select Tools, Compile Java (or Ctrl+1) n To run… – Select Tools, Run Java Application (or Ctrl+2) n To view line numbers of code… – Select Configure, Preferences, View n What’s wrong with using a complex IDE (______ Development Environment) in an introductory course? – Interferes with learning how to write pure Java code 22 – Wastes precious time learning the IDE