WGU D780 TASK 1 – SOFTWARE ARCHITECTURE & DESIGN
Complete Design Patterns and Python Code Refactoring Exemplar Detailed Explanations Tested Code 2026/2027
,TABLE OF CONTENTS / EXAM BLUEPRINT
Section 1: 1. Software Architecture Fundamentals
Section 2: 2. Design Patterns – Creational, Structural, Behavioral
Section 3: 3. Singleton & Factory Patterns – Python Implementation
Section 4: 4. Code Refactoring – Smells & Techniques
Section 5: 5. Inheritance, Abstraction & Clean Code
Section 6: 6. UML Diagrams – Class & Sequence
Section 7: 7. Testing Refactored Code – Unit Tests
Section 8: 8. Documentation & Maintainability
Section 9: 9. Task 1 Integration – Design Patterns & Refactoring Exemplar
,EXAM BLUEPRINT & INSTRUCTIONS
About This Exam:
• 200 original with complete design patterns exemplar – 100% different – fixed factory – new image cover that goes with exam – software
• Covers both tracks: Design Patterns Singleton Factory UML and Code Refactoring Clean Code Inheritance Abstraction per Task 1
• Aligned to WGU D780 Software Architecture and Design Task 1 Complete Design Patterns and Python Code Refactoring Exemplar wit
• Reflects Task 1 format – BaseService abstract OrderService PaymentService Product hierarchy Invoice Report Export Factory Pattern
Instructions:
1. Pace yourself: 200Q complete exemplar detailed explanations tested code
2. Read last line first: architecture design pattern refactoring Python clean code
3. Architecture: BaseService <<abstract>> OrderService id status create_order validate PaymentService transaction_id amount process
4. Design Patterns: Factory Pattern responsibility Create Product Instances class ProductFactory _creators dict create_product(type) Sin
5. Refactoring: BEFORE old implementation if product_type==invoice return InvoiceProduct elif report elif export else ValueError AFTER
6. Testing & Docs: UML class diagram Product Hierarchy tested code pytest unit tests documentation clean code SOLID single responsi
, SECTION ONE: QUESTIONS 1-200
Choose the single best answer. Correct answers and rationales follow each item.
1. Software Architecture Fundamentals
Question 1. During Task 1 review of UML class diagram inheritance arrow, which best
supports Python @classmethod get_instance with tested Python code? WGU D780 Software
Architecture and Design Task 1 Complete Design Patterns and Python Code Refactoring
Exemplar with Detailed Explanations and Tested Code 2026/2027 Updated.
A. Miscalculate UML class diagram inheritance arrow as singleton instantiates each call
– exemplar error.
B. Confuse UML class diagram inheritance arrow with Python @classmethod get_instance:
use if-elif-else chain instead of Factory – code smell not refactored.
C. UML class diagram inheritance arrow: diagram → singleton implementation. Complete
exemplar Q1: diagram implements Python @classmethod get_instance via design pattern and
Python refactoring with detailed explanation and tested code for D780 Task 1.
D. Ignore UML class diagram inheritance arrow: assume factory creates without dict –
incorrect Task 1.
CORRECT ANSWER: C. UML class diagram inheritance arrow: diagram → singleton
implementation. Complete exemplar Q1: diagram implements Python @classmethod
get_instance via design pattern and Python refactoring with detailed explanation and
tested code for D780 Task 1.
RATIONALE: UML: diagram → singleton implementation. Design pattern refactoring clean code.
Others smell. Per D780 Task 1 exemplar.
Question 2. Which UML/code for SOLID single responsibility open-closed correctly
demonstrates before old implementation if elif else ValueError with detailed
explanation? WGU D780 Software Architecture and Design Task 1 Complete Design
Patterns and Python Code Refactoring Exemplar with Detailed Explanations and Tested
Code 2026/2027 Updated.
A. Ignore SOLID single responsibility open-closed: assume clean code irrelevant –
incorrect Task 1.
B. Miscalculate SOLID single responsibility open-closed as singleton instantiates each
call – exemplar error.
C. Confuse SOLID single responsibility open-closed with before old implementation if
elif else ValueError: use if-elif-else chain instead of Factory – code smell not
refactored.
D. SOLID single responsibility open-closed: principles → code smell. Complete exemplar
Q2: principles implements before old implementation if elif else ValueError via design
pattern and Python refactoring with detailed explanation and tested code for D780 Task
1.
CORRECT ANSWER: D. SOLID single responsibility open-closed: principles → code smell.
Complete exemplar Q2: principles implements before old implementation if elif else
ValueError via design pattern and Python refactoring with detailed explanation and
tested code for D780 Task 1.
RATIONALE: SOLID: principles → code smell. Design pattern refactoring clean code. Others
smell. Per D780 Task 1 exemplar.
Complete Design Patterns and Python Code Refactoring Exemplar Detailed Explanations Tested Code 2026/2027
,TABLE OF CONTENTS / EXAM BLUEPRINT
Section 1: 1. Software Architecture Fundamentals
Section 2: 2. Design Patterns – Creational, Structural, Behavioral
Section 3: 3. Singleton & Factory Patterns – Python Implementation
Section 4: 4. Code Refactoring – Smells & Techniques
Section 5: 5. Inheritance, Abstraction & Clean Code
Section 6: 6. UML Diagrams – Class & Sequence
Section 7: 7. Testing Refactored Code – Unit Tests
Section 8: 8. Documentation & Maintainability
Section 9: 9. Task 1 Integration – Design Patterns & Refactoring Exemplar
,EXAM BLUEPRINT & INSTRUCTIONS
About This Exam:
• 200 original with complete design patterns exemplar – 100% different – fixed factory – new image cover that goes with exam – software
• Covers both tracks: Design Patterns Singleton Factory UML and Code Refactoring Clean Code Inheritance Abstraction per Task 1
• Aligned to WGU D780 Software Architecture and Design Task 1 Complete Design Patterns and Python Code Refactoring Exemplar wit
• Reflects Task 1 format – BaseService abstract OrderService PaymentService Product hierarchy Invoice Report Export Factory Pattern
Instructions:
1. Pace yourself: 200Q complete exemplar detailed explanations tested code
2. Read last line first: architecture design pattern refactoring Python clean code
3. Architecture: BaseService <<abstract>> OrderService id status create_order validate PaymentService transaction_id amount process
4. Design Patterns: Factory Pattern responsibility Create Product Instances class ProductFactory _creators dict create_product(type) Sin
5. Refactoring: BEFORE old implementation if product_type==invoice return InvoiceProduct elif report elif export else ValueError AFTER
6. Testing & Docs: UML class diagram Product Hierarchy tested code pytest unit tests documentation clean code SOLID single responsi
, SECTION ONE: QUESTIONS 1-200
Choose the single best answer. Correct answers and rationales follow each item.
1. Software Architecture Fundamentals
Question 1. During Task 1 review of UML class diagram inheritance arrow, which best
supports Python @classmethod get_instance with tested Python code? WGU D780 Software
Architecture and Design Task 1 Complete Design Patterns and Python Code Refactoring
Exemplar with Detailed Explanations and Tested Code 2026/2027 Updated.
A. Miscalculate UML class diagram inheritance arrow as singleton instantiates each call
– exemplar error.
B. Confuse UML class diagram inheritance arrow with Python @classmethod get_instance:
use if-elif-else chain instead of Factory – code smell not refactored.
C. UML class diagram inheritance arrow: diagram → singleton implementation. Complete
exemplar Q1: diagram implements Python @classmethod get_instance via design pattern and
Python refactoring with detailed explanation and tested code for D780 Task 1.
D. Ignore UML class diagram inheritance arrow: assume factory creates without dict –
incorrect Task 1.
CORRECT ANSWER: C. UML class diagram inheritance arrow: diagram → singleton
implementation. Complete exemplar Q1: diagram implements Python @classmethod
get_instance via design pattern and Python refactoring with detailed explanation and
tested code for D780 Task 1.
RATIONALE: UML: diagram → singleton implementation. Design pattern refactoring clean code.
Others smell. Per D780 Task 1 exemplar.
Question 2. Which UML/code for SOLID single responsibility open-closed correctly
demonstrates before old implementation if elif else ValueError with detailed
explanation? WGU D780 Software Architecture and Design Task 1 Complete Design
Patterns and Python Code Refactoring Exemplar with Detailed Explanations and Tested
Code 2026/2027 Updated.
A. Ignore SOLID single responsibility open-closed: assume clean code irrelevant –
incorrect Task 1.
B. Miscalculate SOLID single responsibility open-closed as singleton instantiates each
call – exemplar error.
C. Confuse SOLID single responsibility open-closed with before old implementation if
elif else ValueError: use if-elif-else chain instead of Factory – code smell not
refactored.
D. SOLID single responsibility open-closed: principles → code smell. Complete exemplar
Q2: principles implements before old implementation if elif else ValueError via design
pattern and Python refactoring with detailed explanation and tested code for D780 Task
1.
CORRECT ANSWER: D. SOLID single responsibility open-closed: principles → code smell.
Complete exemplar Q2: principles implements before old implementation if elif else
ValueError via design pattern and Python refactoring with detailed explanation and
tested code for D780 Task 1.
RATIONALE: SOLID: principles → code smell. Design pattern refactoring clean code. Others
smell. Per D780 Task 1 exemplar.