1. Trang chủ
  2. » Giáo án - Bài giảng

Giáo trình Java cơ bản 01

33 324 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 33
Dung lượng 640,44 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Welcome to Object-Oriented Programming Using Java... 1/4 Subject aims  To understand how computers work  To develop techniques for solving problems using a computer  To develop skil

Trang 1

Welcome to Object-Oriented Programming

Using Java

Trang 3

► Subject Information

Trang 4

1/4

Subject aims

 To understand how computers work

 To develop techniques for solving problems using a computer

 To develop skills in algorithm development

and object-oriented programming using the

Java language

 To gain experience in engineering reliable

programs

Trang 5

… in particular

 OOJ/OJA and IPJ/IJA have been designed

to form the core of Java programming

 They provide a solid foundation for Java

application development

Trang 6

1/6

Teaching philosophy

 Learning is an active process

 The role of the teaching staff is to assist

students to learn

 Students must be driven and

self-managed

 Learning in groups is a positive experience

 Problem solving and programming are best

learnt by practice

Trang 7

References

 Textbook

– Walter Savitch, Java: An Introduction to Computer

Science & Programming (Third Edition), Pearson, 2004

– Harley Hahn, Student Guide to Unix, McGraw-Hill, 1996

– Steve Oualline, Vi IMproved – Vim, New Riders, 2001

( http://www.newriders.com/books/opl/ebooks/0735710015.html )

Trang 8

1/8

What is expected from you?

 An interest in the material

 Participation in labs and lectures

 Be aware of the learning environment you

share with other students

– No disruptive behaviour

Trang 9

Overview of OOJ/OJA

 Introduction to Computer Systems,

– Unix Environment and Java Programming

 Primitive Data Types

Trang 10

1/10

►Computer Systems and

Structure

Trang 11

What is a computer?

 A computer is a device for storing and

processing information

 When connected to networks, a computer

becomes a versatile communication tool

 When connected to other devices, a

computer can act as a sophisticated

device-controller

 Java provides facilities to write programs to

Trang 12

1/12

Hardware and software

 A computer consists of hardware and

software

 Hardware consists of the physical

components that make up the computer

 Software consists of programs that control

the hardware to do useful work

 Programming (or coding) is the process of

writing software

Trang 13

Examples of hardware

Trang 14

1/14

Typical components in a PC

CD-ROM drive

Disk drives

Trang 15

Main hardware components

 CPU - Central Processing Unit

– Executes program instructions

 RAM - Internal memory

– Stores programs that are currently being run and data

associated with those programs

– Volatile

 I/O (Input/Output) devices

– Allow information to be input to the computer (e.g

keyboard, mouse, scanner)

– Allow information to be output by the computer (e.g

Trang 16

1/16

Main hardware components

 Secondary storage (or external memory)

– Disk, tape, CD-ROM

– Larger, slower, cheaper than internal memory

– For storage of programs and data not currently

in use

 Bus

– Transmits data and instructions between the

CPU and memory

– n address bits means we can address 2 n memory

locations labelled 0 to 2n - 1

Trang 17

Terminology and functionality

 Files and directories

– Ways of storing and organising data and

programs on secondary storage

– Covered in detail in laboratory classes

 Peripheral devices

– Collective name for secondary storage and I/O

devices

Trang 19

Binary representation

 Inside the computer, data and instructions

are represented as bit patterns

Trang 21

byte 8

3 byte location with address 1

2 byte location with address 4

1 byte location with address 6

3 byte location with address 7

Trang 22

– High-level languages (such as Fortran, Cobol,

Pascal, C, C++, Java, etc.)

 Each programming language has a defined

set of rules that govern the structure of its

program

Trang 24

1/24

 A group of bytes (i.e a sequence of bits) can

represent many different things: a number *,

a character, a string, a picture, a sound track,

a video, or a program instruction

* a real number (one with a fractional part) is represented

by two sequences of bits, one for the mantissa and one for the exponent

Trang 25

 e.g the bit sequence 01000001can be

Trang 29

Algorithms

 Consider the algorithm (an unambiguous

sequence of instructions to perform some

task)

Pseudocode

IF X equals Y THEN

Assign zero to Z ELSE

Assign Y / (X - Y) to Z ENDIF

{next statement}

Trang 31

1/31

System software

 Supports basic operations of the computer

such as managing resources, allowing

transfer of information to and from the

computer

 Examples

– Operating systems (e.g Unix, Windows)

– Communication software (to connect to other

computers and the Internet)

– Compilers (translate high-level programs into

executable code)

Trang 32

– Other programs, for example programs to

support operations of organisations

Trang 33

Next lecture

 Operating systems

 The Unix operating system

 Compiling and running Java programs

Ngày đăng: 24/03/2016, 22:01

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN