TAILIEUCHUNG - Extendelly Hierarchy Box

Extending an Inheritance Hierarchy In the following exercise, you will familiarize yourself with a small hierarchy of interfaces and classes that together implement a very simple framework. | Extending an Inheritance Hierarchy In the following exercise you will familiarize yourself with a small hierarchy of interfaces and classes that together implement a very simple framework. The framework is a Microsoft Windows application that simulates reading a C source file and classifying its contents into tokens identifiers keywords operators and so on . The framework provides a mechanism for visiting each token in turn performing various tasks. For example A displaying visitor class that displays the source file in a rich text box. A printing visitor class that converts tabs to spaces and aligns braces correctly. A spelling visitor class that checks the spelling of each identifier. A guideline visitor class that checks that the public identifiers start with a capital letter and that interfaces start with a capital I. A complexity visitor class that monitors the depth of the brace nesting in the code. A counting visitor class that counts the number of lines in each method the number of members in each class and the number of lines in each source file. Understand the inheritance hierarchy and its purpose 1. Start Microsoft Visual Studio 2005. 2. Open the Tokenizer project located in the Microsoft Press Visual CSharp Step by Step Chapter 12 Tokenizer folder in your My Documents folder. 3. Display the source file in the Code and Text Editor window. The SourceFile class contains a private array field called tokens private IVisitableToken tokens new KeywordToken using new WhitespaceToken new IdentifierToken System new PunctuatorToken . The tokens array contains a sequence of objects that all implement the IVisitableToken interface. Together these tokens simulate the tokens of a simple hello world source file. A complete version of this project would parse a named source file and construct these tokens dynamically. The SourceFile class also contains a public method called Accept. The Accept method has a single parameter of type ITokenVisitor. The body .

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.