|CIT597 Quiz 1
Please keep all answers short and to the point. Read each question and answer
it; don't add information that wasn't asked for.
x is a double variable, write a simple assertion
x is greater than zero and less than
- Write the same assertion as in the previous question, but this time include
the values of
y in the detail
message of the AssertionError that may be thrown.
- Write the Java statement that creates a Pattern from the String
- Write the Java statement that creates a Matcher for the String
using the Pattern defined in the previous question.
- Using the above Matcher, does
find() succeed? If so,
what is returned by each
for each legal value of
- Write a regular expression that will succeed (using
on the string
"abracadabra" and will return
everything between the two
- Name two elements that you should always find within an HTML
- What HTML would you write to draw a horizontal line across the page?
- What HTML would you write to make the entire background of your document
a bright red?
- Name two HTML tags that are not containers.
- What attribute is required in an
- List two (and only two) of the ways in which XHTML is stricter than HTML.
- There are three versions of XHTML. Name two (and only two) of them.
- HTML and XML are designed for different purposes. Briefly, what
is the purpose of each?
- What organization defines the standards for HTML, XHTML, and XML?
- What does it mean to say that an XML document is valid?
- Briefly tell what each of the following symbols means in a DTD:
+ (plus sign)
? (question mark)
| (vertical bar)
- Suppose an XML document consists of just a list of cartoon characters. Each
character has a name and a species, for instance, Sylvester
is a cat; Tweety is a bird.
- Write a short but complete XML document that lists these two cartoon
characters. Don't forget the XML header.
- Write a DTD that describes this document. Make it general enough that
we can add other cartoon characters (of other species) later.