# Re-importing necessary libraries and re-drawing the diagram for the website system as explained earlier.
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
# Create figure for component diagram
fig, ax = plt.subplots(figsize=(10, 8))
# Function to create component boxes with labels
def create_component(ax, x, y, width, height, label, color='lightblue'):
ax.add_patch(mpatches.FancyBboxPatch((x, y), width, height, boxstyle="round,pad=0.3", edgecolor='black', facecolor=color, lw=2))
ax.text(x + width/2, y + height/2, label, ha='center', va='center', fontsize=10, fontweight='bold')
# Title for component diagram
ax.set_title('Component Diagram for ĐHCN Website System', fontsize=14, fontweight='bold')
# Creating components for the website system
create_component(ax, 0.5, 7, 3, 1, "Client (Browser)")
create_component(ax, 0.5, 5, 3, 1, "Web Server 1")
create_component(ax, 4, 5, 3, 1, "Web Server 2")
create_component(ax, 0.5, 3, 3, 1, "Database Server 1 (SQL/Oracle)")
create_component(ax, 4, 3, 3, 1, "Database Server 2 (SQL/Oracle)")
# Label the user role components
create_component(ax, 0.5, 1, 3, 1, "Module: News")
create_component(ax, 4, 1, 3, 1, "Module: Forum")
create_component(ax, 7, 1, 3, 1, "Module: Recruitment")
# Adding arrows between components
ax.annotate('', xy=(2, 7), xytext=(2, 6), arrowprops=dict(facecolor='black', shrink=0.05)) # Client to Web Server 1
ax.annotate('', xy=(5.5, 7), xytext=(5.5, 6), arrowprops=dict(facecolor='black', shrink=0.05)) # Client to Web Server 2
ax.annotate('', xy=(2, 5), xytext=(2, 4), arrowprops=dict(facecolor='black', shrink=0.05)) # Web Server 1 to DB1
ax.annotate('', xy=(5.5, 5), xytext=(5.5, 4), arrowprops=dict(facecolor='black', shrink=0.05)) # Web Server 2 to DB2
# Remove axes
ax.set_xticks([])
ax.set_yticks([])
# Show the component diagram
plt.show()
# your code goes here
IyBSZS1pbXBvcnRpbmcgbmVjZXNzYXJ5IGxpYnJhcmllcyBhbmQgcmUtZHJhd2luZyB0aGUgZGlhZ3JhbSBmb3IgdGhlIHdlYnNpdGUgc3lzdGVtIGFzIGV4cGxhaW5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