PartⅠSelections:
1. What is the correct XHTML for a paragraph?
A. <P></P>
B. <p></p>
C. <P></p>
D. </p><p>
2. Which elements are mandatory in an XHTML document?
A. doctype, html, head, and body
B. doctype, html, head, body, and title
C. doctype, html and body
D. doctype, html, body, and title
3. Which CSS property controls the text size?
A. text-style
B. text-size
C. font-style
D. font-size
4. How do you display a border like this:
The top border = 10 pixels
The bottom border = 5 pixels
The left border = 20 pixels
The right border = 1pixel?
A. border-width:10px 1px 5px 20px
B. border-width:10px 20px 5px 1px
C. border-width:5px 20px 10px 1px
D. border-width:10px 5px 20px 1px
5. How many different kind of loops are there in JavaScript?
A. One. The "for" loop
B. Two. The "for" loop and the "while" loop
C. Three. The “for” loop, the “while” loop as well as “do…while” loop
D. Four. The "for" loop, the "while" loop, the "do...while" loop, and the "loop...until" loop
6. Which statement is true about XML?
A. XML tags are case sensitive
B. All the statements are true
C. XML elements must be properly nested
D. XML documents must have a root tag
7. Which are not correct name for an XML element? (Multiple choices)
A. <xmldocument>
B. <NAME>
C. <phone number>
D. <7eleven>
8. Which are correct for the following description? (Multiple choices)
A. An Interface can have virtual method.
B. A Class can inherit more than one interface.
C. An Interface can not be instantiate。
D. An Interface can include implemented method
9. When retrieving data from database, which following method will be used?
(Multiple choices)
A. ExecuteScalar
B. ExecuteNonQuery
C. Fill
D. ExecuteReader
10. Which is not the command of DCL (Data Control Language)? (Multiple choices)
A. GRANT
B. DELETE
C. REVOKE
D. ALTER
Part ⅡQuestions:
1. What is the different between Interface and Abstract Class?
2. There is a page which body includes 3 div(s) as follow:
…
<Body>
<div id=”#div1”>div1</div>
<div id=”#div2”>div2</div>
<div id=”#div3”>div3</div>
</Body>
…
Please write a CSS to achieve the layout below?
3. Source xml:
<?xml version="1.0" encoding="utf-8" ?>
<contact_info>
<contact id=”c0001”>
<name>John Doe</name>
<phone>555 - 5319</phone>
<city>New York</city>
</contact>
<contact id=”c0002”>
<name>Mary Jones</name>
<phone>555 - 9011</phone>
<city>Los Angeles</city>
</contact>
</contact_info>
Target output:
No. |
Contact Id |
Name |
Phone Number |
Address of city |
1 |
C0002 |
Mary Jones |
555 - 9011 |
Los Angeles |
2 |
C0001 |
John Doe |
555 - 5319 |
New York |
Please write a XSLT file to achieve the transformation from the above xml to the target output?
4. Please try you best to list all the design patterns you’ve known. And select one of them as an example to describe how to implement it with C# code?
Part I answer:
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
D |
B |
D |
A |
B |
C |
ACD |
BC |
ACD |
BD |
Part II answer:
1. Ignore
2.
#div1
{
float:left;
width:60%;
height:400px;
text-align:center;
}
#div2
{
float:right;
width:35%;
height:200px;
text-align:center;
}
#div3
{
float:right;
width:35%;
height:200px;
text-align:center;
}
3. The below is for reference.
<table border="1" width="100%">
<tr>
<td>No.</td>
<td>Contact Id</td>
<td>Name</td>
<td>Phone Number</td>
<td>Address of city</td>
</tr>
<xsl:for-each select="contact_info/contact">
<xsl:sort select="name" order="descending">
</xsl:sort>
<tr>
<td>
<xsl:value-of select="position()"></xsl:value-of>
</td>
<td>
<xsl:value-of select="@id"></xsl:value-of>
</td>
<td>
<xsl:value-of select="name"></xsl:value-of>
</td>
<td>
<xsl:value-of select="phone"></xsl:value-of>
</td>
<td>
<xsl:value-of select="city"></xsl:value-of>
</td>
</tr>
</xsl:for-each>
</table>