CS311 - Assignment
CS311 - Assignment
C311
Name: M. Ahmad
Id: Bc170406373
Q1:
You are required to write XML code for the following description of a software house.
<company>: This is the root element representing the software house company.
o <name>: Specifies the name of the company.
o <location>: Contains information about the company's location.
<city>: Specifies the city where the company is located.
<country>: Specifies the country where the company is located.
o <departments>: Contains a list of departments within the company.
<department>: Represents a single department within the
company.
<name>: Specifies the name of the department.
<employees>: Contains a list of employees within the
department.
<employee>: Represents a single employee
within the department.
<name>: Specifies the name of the
employee.
<position>: Specifies the position or
role of the employee.
o <projects>: Contains a list of projects being undertaken by the
company.
<project>: Represents a single project.
<name>: Specifies the name of the project.
<department>: Specifies the department responsible for
the project.
<status>: Specifies the current status of the project (e.g.,
"In Progress", "Completed").
Ans:
<company>
<name>InnovaCode Solutions</name>
<location>
<city>Karachi</city>
<country>Pakistan</country>
</location>
<departments>
<department>
<name>Development</name>
<employees>
<employee>
<name>John Doe</name>
<position>Software Engineer</position>
</employee>
<employee>
<name>Jane Smith</name>
<position>UI/UX Designer</position>
</employee>
</employees>
</department>
<department>
<name>Testing</name>
<employees>
<employee>
<name>Alice Johnson</name>
<position>QA Analyst</position>
</employee>
<employee>
<name>Bob Williams</name>
<position>Automation Tester</position>
</employee>
</employees>
</department>
</departments>
<projects>
<project>
<name>Project Alpha</name>
<department>Development</department>
<status>In Progress</status>
</project>
<project>
<name>Project Beta</name>
<department>Testing</department>
<status>Completed</status>
</project>
</projects>
</company>