Câu hỏi trắc nghiệmCoursera: Introduction to Software Engineering - SWE201cMOOC 04 - Engineering Practices for Building Quality Software (SWE201c)
Which of the following is most preferred?
4 phương ánCó lời giảiXuất hiện trong 2 bộ đề
A·B·C·DCác phương án trả lời
AAllowing one module to affect the program flow of another via the use of a flag (control coupling)
BHaving more than one module rely on the same version of the RSS standard (external coupling)
Allowing one module to affect the program flow of another via the use of a state message (message coupling)Đúng
DHaving two modules rely on the same global information structure (common coupling)
Giải thích chi tiết
Đáp án đúng: C. Thang coupling xếp từ lỏng tới chặt: no coupling, message coupling, data coupling, data-structure coupling, control coupling, external coupling, common coupling, content coupling. Coupling càng lỏng càng đáng mong muốn, và message coupling là loại lỏng nhất trong các lựa chọn có mặt.
A control coupling nằm ở nhóm trung bình, một module điều khiển luồng của module kia bằng cờ. B external coupling và D common coupling đều thuộc nhóm CHẶT — phụ thuộc vào định dạng bên ngoài, hoặc cùng chia sẻ một cấu trúc dữ liệu toàn cục. Cả ba đều tệ hơn C.