Chapter 1INTRODUCTION TO COMPUTER ANDPROGRAMMING Chapter 1 Hardware a dịch - Chapter 1INTRODUCTION TO COMPUTER ANDPROGRAMMING Chapter 1 Hardware a Việt làm thế nào để nói

Chapter 1INTRODUCTION TO COMPUTER A

Chapter 1
INTRODUCTION TO COMPUTER AND
PROGRAMMING
Chapter 1
 Hardware and software
 Programming Languages
 Problem solution and software development
 Algorithms
Computer Hardware
 Input unit
 Output unit
 Memory unit
 ALU
 CPU
 Secondary storage
Input Unit and Output Unit
 Input Unit
- It obtains information from various input devices and places this information at the disposal of the other units.
- Examples of input devices: keyboards, mouse devices.
 Output Unit
- It takes information that has been processed by the computer and places it on various output devices.
- Most output from computer is displayed on screens, printed on paper, or used to control other devices.
Memory Unit
 The memory unit stores information. Each computer contains memory of two main types: RAM and ROM.
 RAM (random access memory) is volatile. Your program and data are stored in RAM when you are using the computer.
 ROM (read only memory) contains fundamental instructions that cannot be lost or changed by the user. ROM is non-volatile.
ALU and CPU
 Arithmetic and Logic Unit (ALU)
ALU performs all the arithmetic and logic operations.
Ex: addition, subtraction, comparison, etc..
 CPU
The unit supervises the overall operation of the computer.
Secondary Storage
 Secondary storage devices are used to be permanent storage area for programs and data.
 Examples: magnetic tapes, magnetic disks and optical storage CD.
Magnetic hard disk
Floppy disk
CD ROM
etc…
Some terminology
 A computer program is a set of instructions used to operate a computer to produce a specific result.
 Writing computer programs is called computer programming.
 The languages used to create computer programs are called programming languages.
 Software means a program or a set of programs
Machine languages
 Machine languages are the lowest level of computer languages. Programs written in machine language consist of 1 s and 0s.
 Programs in machine language can control directly to the computer’s hardware.
 Example:
00101010 000000000001 000000000010
10011001 000000000010 000000000011
opcode address parts
Machine languages (cont.)
 A machine language instruction consists of two parts: an instruction part and an address part.
 The instruction part (opcode) tells the computer the operation to be performed.
 The address part specifies the memory address of the data to be used in the instruction.
Assembly languages
 Assembly languages perform the same tasks as machine languages, but use symbolic names for opcodes and operands instead of 1 s and 0s.
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
 An assembly language program must be translated into a machine language program before it can be executed on a computer.
Assembler
Translation
program
(assembler)
Assembly
language
program
Machine
language
program
High-level Programming Languages
 High level programming languages create computer programs using instructions that much easier to understand.
 Programs in a high-level languages must be translated into a low level language using a program called a compiler.
 A compiler translates programming code into a lowlevel format.
High-level Programming Languages (cont.)
 High-level languages allow programmers to write instructions that look like every English sentences and commonly-used mathematical notations.
 Each line in a high-level language program is called a statement.
 Example: Result = (First + Second)*Third
Application and System Software
 Two types of computer programs are: application software and system software.
 Application software consists of those programs written to perform particular tasks required by the users.
 System software is the collection of programs that must be available to any computer system for it to operate.
Examples of system software
 The most important system software is the operating system.
MS-DOS, UNIX, MS WINDOWS, MS WINDOWS NT
 Many operating systems allow user to run multiple programs. Such operating systems are called multitasking systems.
 Beside operating systems, language translators are system software.
PROGRAMMING LANGUAGES
 Some well-known programming languages:
FORTRAN 1957
COBOL 1960s
BASIC 1960s
PASCAL 1971 Structure programming
C
C++ Object-oriented programming
Java
 What is Syntax?
A programming language’s syntax is the set of rules for writing correct language statements.
The C Programming Language
 In the 1970s, at Bell Laboratories, Dennis Ritchie and Brian Kernighan designed the C programming language.
 C was used exclusively on UNIX and on mini-computers.
During the 1980s, C compilers were written for other flatforms, including PCs.
 To provide a level of standardization for C language, in 1989, ANSI created a standard version of C, called ANSI C.
 One main benefit of C : it is much closer to assembly language other than other high-level programming languages.
 The programs written in C often run faster and more efficiently than programs written in other high-level programming language.
The C++ Programming Language
 In 1985, at Bell Laboratories, Bjarne Stroutrup created C++ based on the C language. C++ is an extension of C that adds object-oriented programming capabilities.
 C++ is now the most popular programming language for writing programs that run on Windows and Macintosh.
 The standardized version of C++ is referred to as ANSI C++.
 The ANSI standards also define run-time libraries, which contains useful functions, variables, constants, and other programming items that you can add to your programs.
 The ANSI C++ run-time library is called Standard Template Library or Standard C++ Library
Structured Programming
 During 1960s, many large softwares encountered severe difficulties. Software schedules were late, costs exceeded budgets and finished products were unreliable.
 People realized that software development was a far more complex activity than they had imagined.
 Research activity in the 1960s  Structured Programming.
 It is a discipline approach to writing programs that are clearer than unstructured programs, easier to test and debug and easier to modify.
 Chapter 5 discusses the principles of structured programming.
 Pascal (Niklaus Wirth) in 1971 .
 Pascal was designed for teaching structured programming in academic environments and rapidly became the preferred programming languages in most universities.
Object Oriented Programming
 In the 1980s, there is another revolution in the software community: object- oriented programming.
 Objects are reusable software components that model items in the real world.
 Software developers are discovering that: using a modular, object-oriented design and implementation approach can make software development much more
productive.
 OOP refers to the creation of reusable software objects that can be easily incorporated into another program.
Object Oriented Programming (cont.)
 An object is programming code and data that can be treated as an individual unit or component.
 Data refers to information contained within variables, constants, or other types of storage structures. The procedures associated with an object are referred as functions or methods.
 Variables that are associated with an object are referred to as properties or attributes.
 OOP allows programmers to use programming objects that they have written themselves or that have been written by others.
PROBLEM SOLUTION AND SOFTWARE DEVELOPMENT
 Software development consists of three overlapping phases
- Development and Design
- Documentation
- Maintenance
 Software engineering is concerned with creating readable, efficient, reliable, and maintainable programs and systems.
Phase I: Development and Design
The first phase consists of four steps:
1 . Analyse the problem
Analyse the problem requirements to understand what the program must do, what outputs are required and what inputs are needed.
2. Develop a Solution
We develop an algorithm to solve the problem.
Algorithm is a sequence of steps that describes how the data are to be processed to produce the desired outputs.
3. Code the solution
This step consists of translating the algorithm into a computer program using a programming language.
4. Test and correct the program
Phase II: Documentation
 Documentation requires collecting critical documents during the analysis, design, coding, and
testing.
 There are five documents for every program solution:
- Program description
- Algorithm development and changes
- Well-commented program listing
- Sample test runs
- User’s manual
Phase III: Maintenance
 This phase is concerned with
- the ongoing correction of problems,
- revisions to meet changing needs and
- the addition of new features.
ALGORITHMS
 You can describe an algorithm by using flowchart symbols. By that way, you obtain a flowchart.
 Flow chart is an outline of the basic structure or logic of the program.
 Another way to describe an algorithm is using pseudocode.
 Since flowcharts are not convenient to revise, they have fallen out of favor by programmers. Nowadays, the use of pseudocode has gained increasing acceptance.
Flowchart symbols
Terminal
Input/output
Process
Flowlines
Decision
Connector
Predefined process
Example
Start
Input Name,
Hours, Rate
Calculate
Pay  Hours  Rate
Dislay
Name, Pay
End
Note: Name, Hours
and Pay are variables
in the program.
Algorithms in pseudo-code
 You also can use English-like phases to desribe an algorithm. In this case, the description is called pseudocode.
 Example:
Input the three values into the variables Name, Hours, Rate.
Calculate Pay = Hours  Rate.
Display Name and Pay.
Loops Note:
1 . Loop is a very important concept in programming.
2. NUM  NUM + 1 means
old value of NUM + 1
becomes new value of NUM.
Start
NUM  4
SQNUM  NUM2
Print
NUM, SQNUM
NUM  NUM + 1
NUM> 9?
STOP
No
Yes
The algorithm can be d
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
Chương 1GIỚI THIỆU VỀ MÁY TÍNH VÀLẬP TRÌNH Chương 1 phần cứng và phần mềm Programming Languages Ngôn ngữ vấn đề giải pháp và phần mềm phát triển thuật toán Phần cứng máy tính đầu vào đơn vị đầu ra đơn vị đơn vị bộ nhớ ALU CPU Trung học lí Đơn vị đầu vào và đầu ra đơn vị đơn vị đầu vào-Lấy được thông tin từ thiết bị đầu vào khác nhau và địa điểm thông tin này lúc xử lý của các đơn vị khác.-Ví dụ về thiết bị đầu vào: keyboard, thiết bị con chuột. đầu ra đơn vị-Phải mất thông tin đó đã được xử lý bởi máy tính này và đặt nó trên thiết bị đầu ra khác nhau.-Hầu hết sản lượng từ máy tính được hiển thị trên màn hình, in trên giấy, hoặc được sử dụng để kiểm soát các thiết bị khác. Đơn vị bộ nhớ đơn vị bộ nhớ lưu trữ thông tin. Mỗi máy tính chứa bộ nhớ của hai loại chính: RAM và ROM. RAM (bộ nhớ truy cập ngẫu nhiên) là dễ bay hơi. Chương trình và dữ liệu của bạn được lưu trữ trong bộ nhớ RAM khi bạn đang sử dụng máy tính. ROM (bộ nhớ chỉ đọc) có hướng dẫn cơ bản không thể được mất hoặc thay đổi bởi người dùng. ROM là không bay hơi. ALU và CPU số học và Logic đơn vị (ALU)ALU thực hiện tất cả các hoạt động số học và logic.Ví dụ: Ngoài ra, trừ, so sánh, vv... CPUCác đơn vị giám sát hoạt động tổng thể của máy tính. Trung học lưu trữ thiết bị thứ cấp lưu trữ được sử dụng để là khu vực lưu trữ vĩnh viễn cho chương trình và dữ liệu. Ví dụ: từ băng, từ đĩa và đĩa CD quang lưu trữ.Từ đĩa cứngĐĩa mềmCD ROMvv... Một số thuật ngữ A máy tính chương trình là một tập hợp các hướng dẫn sử dụng để vận hành một máy tính để sản xuất một kết quả cụ thể. Viết chương trình máy tính là gọi là máy tính lập trình. ngôn ngữ được sử dụng để tạo ra chương trình máy tính được gọi là ngôn ngữ lập trình. phần mềm có nghĩa là một chương trình hoặc một tập hợp các chương trình Máy ngôn ngữ Máy ngôn ngữ là mức thấp nhất của ngôn ngữ máy tính. Chương trình được viết bằng ngôn ngữ máy bao gồm 1 s và 0s. chương trình ngôn ngữ máy có thể kiểm soát trực tiếp vào phần cứng của máy tính. Ví dụ:00101010 000000000001 00000000001010011001 000000000010 000000000011opcode địa chỉ phần Máy ngôn ngữ (tieáp theo) Một giảng dạy ngôn ngữ máy bao gồm hai phần: một phần hướng dẫn và một phần địa chỉ. phần hướng dẫn (opcode) cho máy tính hoạt động được thực hiện. phần địa chỉ chỉ định địa chỉ bộ nhớ của các dữ liệu được sử dụng trong giảng dạy. Ngôn ngữ hội Hội ngôn ngữ thực hiện nhiệm vụ tương tự như máy ngôn ngữ, nhưng sử dụng tên tượng trưng cho mã và operands thay vì 1 s và 0s.TẢI BASEPAYTHÊM TRẢ THỪACỬA HÀNG GROSSPAY Một chương trình ngôn ngữ lắp ráp phải được dịch sang một ngôn ngữ máy chương trình trước khi nó có thể được thực hiện trên một máy tính. Lắp rápDịch thuậtchương trình(lắp ráp)Lắp rápngôn ngữchương trìnhMáyngôn ngữchương trình Ngôn ngữ lập trình cao cấp Cao cấp ngôn ngữ lập trình tạo ra chương trình máy tính bằng cách sử dụng hướng dẫn đó dễ dàng hơn để hiểu. chương trình trong một ngôn ngữ cấp cao phải được dịch sang một ngôn ngữ thấp cấp bằng cách sử dụng một chương trình được gọi là một trình biên dịch. A biên dịch dịch mã lập trình thành một định dạng lowlevel. Ngôn ngữ lập trình cao cấp (tieáp theo) ngôn ngữ cấp cao cho phép lập trình để viết hướng dẫn mà trông giống như tất cả các câu tiếng Anh và thường sử dụng toán học tả. Mỗi dòng trong một chương trình ngôn ngữ cấp cao được gọi là một tuyên bố. Ví dụ: kết quả = (đầu tiên + thứ hai) * thứ ba Ứng dụng và hệ thống phần mềm Hai loại chương trình máy tính là: phần mềm ứng dụng và hệ thống phần mềm. ứng dụng phần mềm bao gồm những chương trình bằng văn bản để thực hiện nhiệm vụ cụ thể theo yêu cầu của những người sử dụng. Hệ thống phần mềm là tập hợp các chương trình phải có sẵn cho bất kỳ hệ thống máy tính cho nó để hoạt động. Các ví dụ của hệ thống phần mềm Phần mềm hệ thống quan trọng nhất là hệ điều hành.MS-DOS, UNIX, MS WINDOWS, MS WINDOWS NT Nhiều điều hành hệ thống cho phép người sử dụng để chạy nhiều chương trình. Hệ thống điều hành như vậy danh xưng trong tiếng Pháp là hệ thống đa nhiệm. bên cạnh hệ điều hành, phiên dịch ngôn ngữ là hệ thống phần mềm. PROGRAMMING LANGUAGES NGÔN NGỮ nổi tiếng một số ngôn ngữ lập trình:FORTRAN 1957COBOL THẬP NIÊN 1960BASIC THẬP NIÊN 1960PASCAL 1971 cấu trúc chương trìnhCLập trình hướng đối tượng C++Java cú pháp là gì?Cú pháp của một ngôn ngữ lập trình là tập hợp các quy tắc để viết báo cáo đúng ngôn ngữ. Ngôn ngữ lập trình C Trong thập niên 1970, tại Phòng thí nghiệm Bell, Dennis Ritchie và Brian Kernighan thiết kế ngôn ngữ lập trình C. C đã được sử dụng độc quyền trên UNIX và trên các máy tính mini.Trong thập niên 1980, trình biên dịch C được viết cho nền khác, bao gồm cả máy tính cá nhân. Để cung cấp các tiêu chuẩn cho C ngôn ngữ, năm 1989, ANSI tạo ra một phiên bản tiêu chuẩn của C, được gọi là ANSI C. Một lợi ích chính của C: nó là gần gũi hơn để lắp ráp các ngôn ngữ khác hơn so với các ngôn ngữ lập trình cao cấp khác. chương trình viết bằng C thường chạy nhanh hơn và hiệu quả hơn so với chương trình viết bằng ngôn ngữ lập trình cao cấp. Ngôn ngữ lập trình C++ Năm 1985, tại Phòng thí nghiệm Bell, Bjarne Stroutrup tạo ra C++ dựa trên ngôn ngữ C. C++ là một phần mở rộng của C có thêm khả năng lập trình hướng đối tượng. C++ bây giờ là ngôn ngữ lập trình phổ biến nhất để viết chương trình chạy trên Windows và Macintosh. Phiên bản tiêu chuẩn c++ được gọi là ANSI c + +. The ANSI tiêu chuẩn cũng xác định thư viện thời gian chạy, mà có chức năng hữu ích, biến, hằng số, và các mặt hàng khác của lập trình mà bạn có thể thêm vào chương trình của bạn. The ANSI C ++ thời gian chạy thư viện được gọi là tiêu chuẩn mẫu thư viện hoặc thư viện chuẩn C++ Cấu trúc chương trình Trong thập niên 1960, nhiều phần mềm lớn gặp phải những khó khăn nghiêm trọng. Phần mềm lịch đã muộn, chi phí vượt quá ngân sách và thành phẩm được không đáng tin cậy. Người nhận ra rằng phát triển phần mềm là một hoạt động thêm rất nhiều phức tạp hơn những gì họ đã nghĩ. nghiên cứu hoạt động trong thập niên 1960  lập trình cấu trúc. Nó là một cách tiếp cận kỷ luật để viết chương trình rõ ràng hơn so với chương trình có cấu trúc, dễ dàng hơn để kiểm tra và gỡ lỗi và dễ dàng hơn để sửa đổi. Chương 5 thảo luận về các nguyên tắc lập trình cấu trúc. Pascal (Niklaus Wirth) vào năm 1971. Pascal được thiết kế để dạy lập trình cấu trúc trong môi trường học tập và nhanh chóng trở thành ngôn ngữ lập trình ưa thích trong hầu hết các trường đại học. Lập trình hướng đối tượng Trong thập niên 1980, đó là một cuộc cách mạng trong cộng đồng phần mềm: đối tượng - hướng lập trình. đối tượng là những thành phần tái sử dụng phần mềm mô hình các mặt hàng trong thế giới thực. phát triển phần mềm khám phá rằng: sử dụng một mô-đun, đối tượng theo định hướng thiết kế và thực hiện phương pháp tiếp cận có thể làm cho phần mềm phát triển nhiều hơn nữasản xuất. OOP đề cập đến việc tạo ra các đối tượng tái sử dụng phần mềm mà có thể được dễ dàng tích hợp vào một chương trình khác. Đối tượng theo định hướng lập trình (tieáp theo) Một đối tượng lập trình mã và dữ liệu có thể được coi như là một cá nhân đơn vị hoặc phần. dữ liệu đề cập đến thông tin chứa trong biến, hằng số, hoặc các loại lưu trữ cấu trúc. Các thủ tục liên quan đến một đối tượng được gọi là chức năng hoặc phương pháp. Biến có liên quan đến một đối tượng được gọi là tài sản hoặc thuộc tính. hướng đối tượng cho phép lập trình để sử dụng các đối tượng lập trình mà họ đã viết bản thân hoặc mà đã được viết bởi những người khác. PHÁT TRIỂN PHẦN MỀM VÀ GIẢI PHÁP VẤN ĐỀ phần mềm phát triển bao gồm ba giai đoạn trùng nhau-Phát triển và thiết kế-Tài liệu-Bảo trì phần mềm kỹ thuật là có liên quan với việc tạo ra có thể đọc được, hiệu quả và đáng tin cậy, và duy trì các chương trình và hệ thống. Giai đoạn I: phát triển và thiết kếGiai đoạn đầu tiên bao gồm bốn bước:1. Phân tích vấn đềPhân tích các vấn đề yêu cầu để hiểu những gì chương trình phải làm, đầu ra những gì là cần thiết và đầu vào những gì là cần thiết.2. phát triển một giải phápChúng tôi phát triển một thuật toán để giải quyết vấn đề.Thuật toán là một chuỗi các bước mô tả làm thế nào dữ liệu phải được xử lý để sản xuất các kết quả đầu ra mong muốn.3. mã giải phápBước này bao gồm dịch thuật toán vào một chương trình máy tính bằng cách sử dụng một ngôn ngữ lập trình.4. kiểm tra và khắc phục chương trình Giai đoạn II: tài liệu tài liệu yêu cầu thu thập tài liệu quan trọng trong việc phân tích, thiết kế, mã hóa, vàthử nghiệm. Có là các tài liệu năm cho mỗi giải pháp chương trình:-Chương trình mô tả-Thuật toán phát triển và thay đổi-Danh sách chương trình cũng nhận xét-Mẫu thử nghiệm chạy-Hướng dẫn sử dụng Giai đoạn III: bảo trì giai đoạn này là có liên quan với-liên tục sửa chữa vấn đề,-Sửa đổi để đáp ứng nhu cầu thay đổi và-việc bổ sung các tính năng mới. THUẬT TOÁN Bạn có thể mô tả một giải thuật bằng cách sử dụng sơ đồ ký hiệu. Bằng cách đó, bạn có được một sơ đồ. biểu đồ dòng chảy là một phác thảo của cấu trúc cơ bản hoặc logic của chương trình. Một cách để mô tả một thuật toán sử dụng mã giả. Vì flowcharts không thuận tiện cho sửa đổi, họ đã rơi ra khỏi lợi bởi lập trình viên. Ngày nay, việc sử dụng của mã giả đã được chấp nhận ngày càng tăng. Sơ đồ biểu tượngThiết bị đầu cuốiĐầu vào/đầu raQuá trìnhFlowlinesQuyết địnhKết nốiĐược xác định trước quá trình Ví dụBắt đầuNhập tên,Giờ, tỷ lệTính toánTrả  giờ  tỷ lệDislayTên, phải trả tiềnKết thúcLưu ý: Tên, giờvà trả tiền là biếntrong chương trình. Thuật toán trong mã giả Bạn cũng có thể sử dụng tiếng Anh như giai đoạn để tả một thuật toán. Trong trường hợp này, các mô tả được gọi là mã giả. Ví dụ:Nhập vào các giá trị ba vào biến tên, giờ, tỷ lệ.Tính toán trả = giờ  tỷ lệ.Tên hiển thị và trả tiền. Vòng lưu ý:1. Loop là một khái niệm rất quan trọng trong chương trình.2. số  in a + 1 có nghĩa làCác giá trị cũ của in a + 1trở thành các giá trị mới của số còn t.Bắt đầuNUM  4SQNUM  NUM2InIN A, SQNUMNUM  IN A + 1NUM > 9?DừngKhôngCóCác thuật toán có thể là d
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
Chapter 1
INTRODUCTION TO COMPUTER AND
PROGRAMMING
Chapter 1
 Hardware and software
 Programming Languages
 Problem solution and software development
 Algorithms
Computer Hardware
 Input unit
 Output unit
 Memory unit
 ALU
 CPU
 Secondary storage
Input Unit and Output Unit
 Input Unit
- It obtains information from various input devices and places this information at the disposal of the other units.
- Examples of input devices: keyboards, mouse devices.
 Output Unit
- It takes information that has been processed by the computer and places it on various output devices.
- Most output from computer is displayed on screens, printed on paper, or used to control other devices.
Memory Unit
 The memory unit stores information. Each computer contains memory of two main types: RAM and ROM.
 RAM (random access memory) is volatile. Your program and data are stored in RAM when you are using the computer.
 ROM (read only memory) contains fundamental instructions that cannot be lost or changed by the user. ROM is non-volatile.
ALU and CPU
 Arithmetic and Logic Unit (ALU)
ALU performs all the arithmetic and logic operations.
Ex: addition, subtraction, comparison, etc..
 CPU
The unit supervises the overall operation of the computer.
Secondary Storage
 Secondary storage devices are used to be permanent storage area for programs and data.
 Examples: magnetic tapes, magnetic disks and optical storage CD.
Magnetic hard disk
Floppy disk
CD ROM
etc…
Some terminology
 A computer program is a set of instructions used to operate a computer to produce a specific result.
 Writing computer programs is called computer programming.
 The languages used to create computer programs are called programming languages.
 Software means a program or a set of programs
Machine languages
 Machine languages are the lowest level of computer languages. Programs written in machine language consist of 1 s and 0s.
 Programs in machine language can control directly to the computer’s hardware.
 Example:
00101010 000000000001 000000000010
10011001 000000000010 000000000011
opcode address parts
Machine languages (cont.)
 A machine language instruction consists of two parts: an instruction part and an address part.
 The instruction part (opcode) tells the computer the operation to be performed.
 The address part specifies the memory address of the data to be used in the instruction.
Assembly languages
 Assembly languages perform the same tasks as machine languages, but use symbolic names for opcodes and operands instead of 1 s and 0s.
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
 An assembly language program must be translated into a machine language program before it can be executed on a computer.
Assembler
Translation
program
(assembler)
Assembly
language
program
Machine
language
program
High-level Programming Languages
 High level programming languages create computer programs using instructions that much easier to understand.
 Programs in a high-level languages must be translated into a low level language using a program called a compiler.
 A compiler translates programming code into a lowlevel format.
High-level Programming Languages (cont.)
 High-level languages allow programmers to write instructions that look like every English sentences and commonly-used mathematical notations.
 Each line in a high-level language program is called a statement.
 Example: Result = (First + Second)*Third
Application and System Software
 Two types of computer programs are: application software and system software.
 Application software consists of those programs written to perform particular tasks required by the users.
 System software is the collection of programs that must be available to any computer system for it to operate.
Examples of system software
 The most important system software is the operating system.
MS-DOS, UNIX, MS WINDOWS, MS WINDOWS NT
 Many operating systems allow user to run multiple programs. Such operating systems are called multitasking systems.
 Beside operating systems, language translators are system software.
PROGRAMMING LANGUAGES
 Some well-known programming languages:
FORTRAN 1957
COBOL 1960s
BASIC 1960s
PASCAL 1971 Structure programming
C
C++ Object-oriented programming
Java
 What is Syntax?
A programming language’s syntax is the set of rules for writing correct language statements.
The C Programming Language
 In the 1970s, at Bell Laboratories, Dennis Ritchie and Brian Kernighan designed the C programming language.
 C was used exclusively on UNIX and on mini-computers.
During the 1980s, C compilers were written for other flatforms, including PCs.
 To provide a level of standardization for C language, in 1989, ANSI created a standard version of C, called ANSI C.
 One main benefit of C : it is much closer to assembly language other than other high-level programming languages.
 The programs written in C often run faster and more efficiently than programs written in other high-level programming language.
The C++ Programming Language
 In 1985, at Bell Laboratories, Bjarne Stroutrup created C++ based on the C language. C++ is an extension of C that adds object-oriented programming capabilities.
 C++ is now the most popular programming language for writing programs that run on Windows and Macintosh.
 The standardized version of C++ is referred to as ANSI C++.
 The ANSI standards also define run-time libraries, which contains useful functions, variables, constants, and other programming items that you can add to your programs.
 The ANSI C++ run-time library is called Standard Template Library or Standard C++ Library
Structured Programming
 During 1960s, many large softwares encountered severe difficulties. Software schedules were late, costs exceeded budgets and finished products were unreliable.
 People realized that software development was a far more complex activity than they had imagined.
 Research activity in the 1960s  Structured Programming.
 It is a discipline approach to writing programs that are clearer than unstructured programs, easier to test and debug and easier to modify.
 Chapter 5 discusses the principles of structured programming.
 Pascal (Niklaus Wirth) in 1971 .
 Pascal was designed for teaching structured programming in academic environments and rapidly became the preferred programming languages in most universities.
Object Oriented Programming
 In the 1980s, there is another revolution in the software community: object- oriented programming.
 Objects are reusable software components that model items in the real world.
 Software developers are discovering that: using a modular, object-oriented design and implementation approach can make software development much more
productive.
 OOP refers to the creation of reusable software objects that can be easily incorporated into another program.
Object Oriented Programming (cont.)
 An object is programming code and data that can be treated as an individual unit or component.
 Data refers to information contained within variables, constants, or other types of storage structures. The procedures associated with an object are referred as functions or methods.
 Variables that are associated with an object are referred to as properties or attributes.
 OOP allows programmers to use programming objects that they have written themselves or that have been written by others.
PROBLEM SOLUTION AND SOFTWARE DEVELOPMENT
 Software development consists of three overlapping phases
- Development and Design
- Documentation
- Maintenance
 Software engineering is concerned with creating readable, efficient, reliable, and maintainable programs and systems.
Phase I: Development and Design
The first phase consists of four steps:
1 . Analyse the problem
Analyse the problem requirements to understand what the program must do, what outputs are required and what inputs are needed.
2. Develop a Solution
We develop an algorithm to solve the problem.
Algorithm is a sequence of steps that describes how the data are to be processed to produce the desired outputs.
3. Code the solution
This step consists of translating the algorithm into a computer program using a programming language.
4. Test and correct the program
Phase II: Documentation
 Documentation requires collecting critical documents during the analysis, design, coding, and
testing.
 There are five documents for every program solution:
- Program description
- Algorithm development and changes
- Well-commented program listing
- Sample test runs
- User’s manual
Phase III: Maintenance
 This phase is concerned with
- the ongoing correction of problems,
- revisions to meet changing needs and
- the addition of new features.
ALGORITHMS
 You can describe an algorithm by using flowchart symbols. By that way, you obtain a flowchart.
 Flow chart is an outline of the basic structure or logic of the program.
 Another way to describe an algorithm is using pseudocode.
 Since flowcharts are not convenient to revise, they have fallen out of favor by programmers. Nowadays, the use of pseudocode has gained increasing acceptance.
Flowchart symbols
Terminal
Input/output
Process
Flowlines
Decision
Connector
Predefined process
Example
Start
Input Name,
Hours, Rate
Calculate
Pay  Hours  Rate
Dislay
Name, Pay
End
Note: Name, Hours
and Pay are variables
in the program.
Algorithms in pseudo-code
 You also can use English-like phases to desribe an algorithm. In this case, the description is called pseudocode.
 Example:
Input the three values into the variables Name, Hours, Rate.
Calculate Pay = Hours  Rate.
Display Name and Pay.
Loops Note:
1 . Loop is a very important concept in programming.
2. NUM  NUM + 1 means
old value of NUM + 1
becomes new value of NUM.
Start
NUM  4
SQNUM  NUM2
Print
NUM, SQNUM
NUM  NUM + 1
NUM> 9?
STOP
No
Yes
The algorithm can be d
đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2025 I Love Translation. All reserved.

E-mail: