Đang chuẩn bị liên kết để tải về tài liệu:
Giáo trình phân tích ứng dụng nguyên lý gán đối tượng cho một giao diện đối lập p3

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

Tham khảo tài liệu 'giáo trình phân tích ứng dụng nguyên lý gán đối tượng cho một giao diện đối lập p3', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | bộ khởi tạo lớp Document lấy một tham số public Document string s Console.WriteLine Creating document with 0 s thực thi giao diện IStorable public void Read Console.WriteLine Implementing the Read Method for IStorable public void Write object o Console.WriteLine Implementing the Write Method for IStorable public int Status get return status set status value thực thi ICompressible public void Compress Console.WriteLine Implementing Compress public void Decompress Console.WriteLine Implementing Decompress thực thi giao diện ILoggedCompressible public void LogSavedBytes Console.WriteLine Implementing LogSavedBytes 183 thực thi giao diện IStorableCompressible public void LogOriginalSize Console.WriteLine Implementing LogOriginalSize thực thi giao diện public void Encrypt Console.WriteLine Implementing Encrypt public void Decrypt Console.WriteLine Implementing Decrypt biến thành viên lưu dữ liệu cho thuộc tính private int status 0 public class Tester public static void Main tạo đối tượng document Document doc new Document Test Document gán đối tượng cho giao diện IStorable isDoc doc as IStorable if isDoc null isDoc.Read else Console.WriteLine IStorable not supported ICompressible icDoc doc as ICompressible if icDoc null icDoc.Compress 184 else Console.WriteLine Compressible not supported ILoggedCompressible ilcDoc doc as ILoggedCompressible if ilcDoc null ilcDoc.LogSavedBytes ilcDoc.Compress ilcDoc.Read không thể gọi được else Console.WriteLine LoggedCompressible not supported IStorableCompressible isc doc as IStorableCompressible if isc null isc.LogOriginalSize IStorableCompressible isc.LogSavedBytes ILoggedCompressible isc.Compress ICompress isc.Read IStorable else Console.WriteLine StorableCompressible not supported IEncryptable ie doc as IEncryptable if ie null ie.Encrypt else Console.WriteLine Encryptable not supported .