Đang chuẩn bị liên kết để tải về tài liệu:
Scenario Supposing

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

The Automated Factory Scenario Suppose you are writing the control systems for an automated factory. The factory contains a large number of different machines, each performing distinct tasks in the production | The Automated Factory Scenario Suppose you are writing the control systems for an automated factory. The factory contains a large number of different machines each performing distinct tasks in the production of the articles manufactured by the factory shaping and folding metal sheets welding sheets together painting sheets and so on. Each machine was built and installed by a specialist vendor. The machines are all computer-controlled and each vendor has provided a set of APIs that you can use to control their machine. Your task is to integrate the different systems used by the machines into a single control program. One aspect that you have decided to concentrate on is to provide a means of shutting all the machines down quickly if needed NOTE The term API means Application Programming Interface. It is a method or set of methods exposed by a piece of software allowing you to control that software. You can think of the .NET Framework as a set of APIs as it provides methods allowing you to control the .NET common language runtime and the Microsoft Windows operating system. Each machine has its own unique computer-controlled process and API for shutting down safely. These are summarized below StopFolding Folding and shaping machine FinishWelding Welding machine PaintOff Painting machine Implementing the Factory Without Using Delegates A simple approach to implementing the shutdown functionality in the control program is shown below class Controller . public void ShutDown folder.StopFolding welder.FinishWelding painter.PaintOff . Fields representing the different machines private FoldingMachine folder private WeldingMachine welder private PaintingMachine painter Although this approach works it is not very extensible or flexible. If the factory buys a new machine you must modify this code the Controller class and the machines are tightly coupled. Implementing the Factory by Using a Delegate However although the names of each method are different they all have the same .

TÀI LIỆU LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.