Homework Solution: Java Programming Problem:…

    Java Programming Problem: Hollywood likes to make remakes of movies. Unfortunately, this means our DVD collection may have duplicate titles of movies that were released in different years. We will use the dvd.xml and dvd.dtd presented in the commentary. To distinguish these remakes from the original, we will need to add a new field called release_year and modify the dvd.dtd accordingly. Afterwards, write an XML parser (either in DOM or StAX) that will count the number of movies released by decade. Add a few more DVD entries to our DVD collection XML file collection to verify your code works. Print the result with the following example XML format: <DVD> <summary> <count decade="1980">2</count> <count decade="1990">10</count> <count decade="2000">13</count> </summary> </DVD> Note: Don't worry about writing a DTD for the summary XML file.

    Expert Answer

    Java Programming Problem:

    Hollywood likes to reach remakes of movies. Unfortunately, this resources our DVD assemblage may own portraiture titles of movies that were released in irrelative years. We get right the dvd.xml and dvd.dtd presented in the criticism.

    To discern these remakes from the cemer, we get scarcity to supplement a novel scene designated release_year and modify the dvd.dtd acceptably.

    Afterwards, transcribe an XML parser (either in DOM or StAX) that get calculate the enumerate of movies released by decade.

    Supplement a rare past DVD entries to our DVD assemblage XML smooth assemblage to warrant your command works.

    Print the upshot with the aftercited specimen XML cemat:

    <DVD>
    <summary>
    <calculate decade=”1980″>2</count>
    <calculate decade=”1990″>10</count>
    <calculate decade=”2000″>13</count>
    </summary>
    </DVD>

    Note: Don’t importune about communication a DTD ce the digest XML smooth.

    Expert Exculpation