java语言程序设计基础篇(第八版)ppt课件第一章.ppt
《java语言程序设计基础篇(第八版)ppt课件第一章.ppt》由会员分享,可在线阅读,更多相关《java语言程序设计基础篇(第八版)ppt课件第一章.ppt(63页珍藏版)》请在三一办公上搜索。
1、1,Chapter 1 Introduction to Computers, Programs, and Java,2,Objectives,To review computer basics, programs, and operating systems (1.2-1.4). To explore the relationship between Java and the World Wide Web (1.5).To distinguish the terms API, IDE, and JDK (1.6).To write a simple Java program (1.7).To
2、display output on the console (1.7).To explain the basic syntax of a Java program (1.7).To create, compile, and run Java programs (1.8). (GUI) To display output using the JOptionPane output dialog boxes (1.9).,3,What is a Computer?,A computer consists of a CPU, memory, hard disk, floppy disk, monito
3、r, printer, and communication devices.,4,CPU,The central processing unit (CPU) is the brain of a computer. It retrieves instructions from memory and executes them. The CPU speed is measured in megahertz (MHz), with 1 megahertz equaling 1 million pulses per second. The speed of the CPU has been impro
4、ved continuously. If you buy a PC now, you can get an Intel Pentium 4 Processor at 3 gigahertz (1 gigahertz is 1000 megahertz).,5,Memory,Memory is to store data and program instructions for CPU to execute. A memory unit is an ordered sequence of bytes, each holds eight bits. A program and its data m
5、ust be brought to memory before they can be executed. A memory byte is never empty, but its initial content may be meaningless to your program. The current content of a memory byte is lost whenever new information is placed in it.,6,How Data is Stored?,Data of various kinds, such as numbers, charact
6、ers, and strings, are encoded as a series of bits (zeros and ones). Computers use zeros and ones because digital devices have two stable states, which are referred to as zero and one by convention. The programmers need not to be concerned about the encoding and decoding of data, which is performed a
7、utomatically by the system based on the encoding scheme. The encoding scheme varies. For example, character J is represented by 01001010 in one byte. A small number such as three can be stored in a single byte. If computer needs to store a large number that cannot fit into a single byte, it uses a n
8、umber of adjacent bytes. No two data can share or split a same byte. A byte is the minimum storage unit.,7,Storage Devices,Memory is volatile, because information is lost when the power is off. Programs and data are permanently stored on storage devices and are moved to memory when the computer actu
9、ally uses them. There are three main types of storage devices:Disk drives (hard disks and floppy disks), CD drives (CD-R and CD-RW), and Tape drives.,8,Output Devices: Monitor,The monitor displays information (text and graphics). The resolution and dot pitch determine the quality of the display.,9,M
10、onitor Resolution and Dot Pitch,The resolution specifies the number of pixels per square inch. Pixels (short for “picture elements”) are tiny dots that form an image on the screen. The resolution can be set manually. The higher the resolution, the sharper and clearer the image is. However, the image
11、 may be very small if you set high resolution on a small screen monitor. PC monitors are usually 15-inch, 17-inch, 19-inch, or 21-inch. For a 15-inch monitor, a comfortable resolution setting would be 640480 (307,200 pixels).,resolution,The dot pitch is the amount of space between pixels. The smalle
12、r the dot pitch, the better the display.,dot pitch,10,Communication Devices,A regular modem uses a phone line and can transfer data in a speed up to 56,000 bps (bits per second). A DSL (digital subscriber line) also uses a phone line and can transfer data in a speed 20 times faster than a regular mo
13、dem. A cable modem uses the TV cable line maintained by the cable company. A cable modem is as fast as a DSL. Network interface card (NIC) is a device to connect a computer to a local area network (LAN). The LAN is commonly used in business, universities, and government organizations. A typical type
14、 of NIC, called 10BaseT, can transfer data at 10 mbps (million bits per second).,11,Programs,Computer programs, known as software, are instructions to the computer. You tell a computer what to do through programs. Without programs, a computer is an empty machine. Computers do not understand human la
15、nguages, so you need to use computer languages to communicate with them. Programs are written using programming languages.,12,Programming Languages,Machine Language Assembly Language High-Level Language,Machine language is a set of primitive instructions built into every computer. The instructions a
16、re in the form of binary code, so you have to enter binary codes for various instructions. Program with native machine language is a tedious process. Moreover the programs are highly difficult to read and modify. For example, to add two numbers, you might write an instruction in binary like this:110
17、1101010011010,13,Programming Languages,Machine Language Assembly Language High-Level Language,Assembly languages were developed to make programming easy. Since the computer cannot understand assembly language, however, a program called assembler is used to convert assembly language programs into mac
18、hine code. For example, to add two numbers, you might write an instruction in assembly code like this: ADDF3 R1, R2, R3,14,Programming Languages,Machine Language Assembly Language High-Level Language,The high-level languages are English-like and easy to learn and program. For example, the following
19、is a high-level language statement that computes the area of a circle with radius 5: area = 5 * 5 * 3.1415;,15,Popular High-Level Languages,COBOL (COmmon Business Oriented Language)FORTRAN (FORmula TRANslation) BASIC (Beginner All-purpose Symbolic Instructional Code) Pascal (named for Blaise Pascal)
20、 Ada (named for Ada Lovelace) C (whose developer designed B first) Visual Basic (Basic-like visual language developed by Microsoft) Delphi (Pascal-like visual language developed by Borland) C+ (an object-oriented language, based on C)C# (a Java-like language developed by Microsoft)Java (We use it in
21、 the book),16,Compiling Source Code,A program written in a high-level language is called a source program. Since a computer cannot understand a source program. Program called a compiler is used to translate the source program into a machine language program called an object program. The object progr
22、am is often then linked with other supporting library code before the object can be executed on the machine.,17,Operating Systems,The operating system (OS) is a program that manages and controls a computers activities. You are probably using Windows 98, NT, 2000, XP, or ME. Windows is currently the
23、most popular PC operating system. Application programs such as an Internet browser and a word processor cannot run without an operating system.,18,Why Java?,The answer is that Java enables users to develop and deploy applications on the Internet for servers, desktop computers, and small hand-held de
24、vices. The future of computing is being profoundly influenced by the Internet, and Java promises to remain a big part of that future. Java is the Internet programming language.Java is a general purpose programming language. Java is the Internet programming language.,19,Java, Web, and Beyond,Java can
25、 be used to develop Web applications.Java AppletsJava Web ApplicationsJava can also be used to develop applications for hand-held devices such as Palm and cell phones,20,Examples of Javas Versatility (Applets),21,PDA and Cell Phone,22,Javas History,James Gosling and Sun MicrosystemsOakJava, May 20,
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- java 语言程序设计 基础 第八 ppt 课件 第一章
链接地址:https://www.31ppt.com/p-1480983.html