tailieunhanh - Beginning microsoft Visual Basic 2010 phần 2

kể từ khi họ lần đầu tiên được phát minh và có lẽ sẽ không thay đổi trong thời đại của chúng ta. Quy trình và kỷ luật của phát triển phần mềm là một ví dụ tốt về một khía cạnh của công nghệ máy tính có tính chất thiết yếu không thay đổi kể từ khi thành lập. | 38 I CHAPTERS WRITING SOFTWARE Algorithms The computer industry changes at an incredible speed. Most professionals retrain and reeducate themselves on an ongoing basis to keep their skills sharp and up-to-date. However some aspects of computing haven t really changed since they were first invented and perhaps won t change within our lifetimes. The process and discipline of software development is a good example of an aspect of computer technology whose essential nature hasn t changed since its inception. For software to work you need to have some data to work with. The software then takes that data and manipulates it into another form. For example software may take your customer database stored as ones and zeroes on your computer s hard drive and make it available for you to read on your computer s monitor. The on-board computer in your car constantly examines the environmental and performance information adjusting the fuel mix to make your car run at maximum efficiency. For every call you make or receive your cell phone provider records the phone number and the length of the call in order to generate a bill based on this information. The base underpinning of all software is the algorithm. Before you can write software to solve a problem you have to break it down into a step-by-step description of how the problem is going to be solved. An algorithm is independent of the programming language so if you like you can describe it to yourself either as a spoken language with diagrams or with whatever helps you visualize the problem. Imagine that you work for a wireless telephone company and need to produce bills based on calls that your customers make. Here s an algorithm that describes a possible solution 1. On the first day of the month you need to produce a bill for each customer. 2. For each customer you have a list of calls that the customer has made in the previous month. 3. You know the duration of each call and the time of day when the call was made. Based on .