NashSamuel Claude18901968nash.gif NashIsaiah ParkerMayfield18601937 ipmnash.gif WeedMartha Angeline18611929aweed.gif JeffaresSara Ruth18981997srjeff.gif JeffaresBennnet Wiley Thomas18621943bwtjeff.gif JeffaresBennett Rainey18381866brjeff.gif BankstonMary Josephine18661960josebank.gif HopkinsMargret 18481937mhopk.gif CochranParazade 18411917parazade.jpg CochranJohn 18011882jcoch.gif BankstonBerry 18451920bbank.gif ParksWalker Bell18791952wbparks2.jpg ParksJohn Wesley18471939jwparks2.jpg HayesMary Ann18671923mahayes.jpg HayesWillian Sidney18221879wshayes2.jpg HockenhullEllen 18551917ehock2.jpg HockenhullJohn 18111880hock2.jpg SuttonMary Ann18151841sutton.jpg BryanThomas Johnson18311897tjbryan2.jpg BryanLeila Ida18731955lbryan.jpg BrownAnnis 18361897abrown.jpg
DISC 3371 Final Exam Answers Fall 2005 Parks

Click "View", then "SOURCE" to see the code

1. (40 points)
 
var p = new Array(21);

p[0]="Brown,Annis,,1836,1897,abrown.jpg,";
p[1]="Nash,Samuel,Claude,1890,1968,nash.gif,";
p[2]="Nash,Isaiah Parker,Mayfield,1860,1937,ipmnash.gif,";
p[3]="Weed,Martha,Angeline,1861,1929,aweed.gif,";
.
.
.
p[18]="Sutton,Mary,Ann,1815,1841,sutton.jpg,";
p[19]="Bryan,Thomas,Johnson,1831,1897,tjbryan2.jpg,";
p[20]="Bryan,Leila,Ida,1873,1955,lbryan.jpg,";
 

Assume a 21 element array named p is dimensioned in your javascript code and the array elements are assigned the string values as shown to the left. Each string contains six data items separated by commas. The six items are: last name, first name, middle name (if any--i.e., there may not be any characters in this field), birth year, death year and image file name.

Note: there is a comma at the end of each string.
Note: Only seven of the 21 strings are shown at the left

The button shown below at the left causes the javascript function named part1 to be executed. The program then:

  1. Creates a string that presents the data in a table. Make one row for each person -- each row with six columns.
  2. In the last column display the image file in appropriate HTML format. Make all images have height="50"
  3. Place the resulting table string in the DIV block with id="part1_out"
Show no HTML. Show ONLY the javascript for part1.

This is the original value of the DIV block with id="part1_out" -- the results will appear here

2. (40 points) Rather than the data in the problem above being predefined as strings and stored in an array, assume the data is stored in an XML data island with id="family_data" (i.e., <XML id="family_data"> ). Assume the following DTD:

<?xml version="1.0"?>
<!DOCTYPE family [
<!ELEMENT family ( person+ ) >
<!ELEMENT person ( last_name, first_name, middle_name, born, died, image_file_name ) >
<!ELEMENT last_name (#PCDATA) >
<!ELEMENT first_name (#PCDATA) >
<!ELEMENT middle_name (#PCDATA) >
<!ELEMENT born (#PCDATA) >
<!ELEMENT died (#PCDATA) >
<!ELEMENT image_file_name (#PCDATA) >
]>

When the user clicks the VBScript sub part2 is executed. This function:

  1. Retrieves the XML data from the data island and
  2. produces the same table output as in problem (1) above
Note: Do NOT do parse checks on the XML
Note: For the output DIV block use id="p2_out"
Note: To access the second level XML elements in VBScript use the syntax:

            root.childNodes(i).childNodes(j).text

            where i is the index of the first level and j is the index of the second level.
Here is a sample (first three persons) of the XML data island:

<xml id="family_data">
<?xml version="1.0"?>
<family>
<person><last_name>Nash</last_name><first_name>Samuel</first_name><middle_name>Claude</middle_name>
   <born>1890</born><died>1968</died> <image_file_name>nash.gif</image_file_name></person>
<person><last_name>Nash</last_name><first_name>Isaiah Parker</first_name><middle_name>Mayfield</middle_name>
   <born>1860</born><died>1937</died><image_file_name>ipmnash.gif</image_file_name></person>
<person><last_name>Weed</last_name><first_name>Martha</first_name> <middle_name>Angeline</middle_name>
   <born>1861</born><died>1929</died><image_file_name>aweed.gif</image_file_name></person>
.
.
. and 18 more persons ... then: </family></XML>

Write only the VBScript for part2. Show NO HTML.

This is the original value of the DIV block with id="part2_out" -- the results will appear here

3. (20 points) Circle the right answer.

 
ANSWERS IN GRAY
 
 1. Cullinet's main product?
(a) INGRES
 
(b) INFORMIX
 
(c) SYBASE
 
(d) IDMS
 
(e) IMS
 
 2. Oracle founder(s)?
(a) Plattner & Hopp
 
(b) Ellison
 
(c) Wang
 
(d) Codd
 
(e) J.D. Edwards
 
 3. First "Killer App" for PC's (1979)
(a) Ashton-Tate
 
(b) DB2
 
(c) VisiCalc
 
(d) Windows
 
(e) FTP
 
 4. Bill Gate's first product?
(a) MS-DOS
 
(b) BASIC
 
(c) EXCEL
 
(d) WORD
 
(e) WINDOWS
 
 5. Autodesk founder?
(a) Mitch Kapor
 
(b) Dan Bricklin
 
(c) Paul Allen
 
(d) John Warnock
 
(e) John Walker
 
 6. Victim of Microsoft Excel ?
(a) Lotus Development
 
(b) Ashton-Tate
 
(c) Digital Research
 
(d) Intel
 
(e) Alpha Micro
 
 7. Wrote PONG?
(a) Dan Bricklin
 
(b) Electronic Arts
 
(c) Atari
 
(d) Nolan Bushnell
 
(e) Gary Kindall
 
 8. Microsoft' failed in its attempt in 1994 to take over...?
(a) Netscape
 
(b) Novell
 
(c) Computer Associates
 
(d) Intuit
 
(e) Oracle
 
 9. The developer of MS-DOS?
(a) Simon Ramo
 
(b) Tim Patterson
 
(c) John Page
 
(d) Roy Nutt
 
(e) Gordon Eubanks
 
 10. A windows based operating system first developed at...?
(a) Seattle Software
 
(b) Santa Cruz
 
(c) Bell Labs
 
(d) Xerox PARC
 
(e) Redmond, Washington