CECS 5100

Survey of Educational Computer Languages

Fall 2003

Need a free MP3 Player to listen to these clips ?


Assignment 1 Review
  • Review of Assignment #1 part A
    Audio (7.7M 16:69)
      <html>
      <head>
      
      </head>
      <body>
      Part 1: (5 pts)<br>
      Using JavaScript within HTML write an html/script 
      that incorporates the following elements:
      <p>
      	a. uses the JS document.write<br>
      	b. uses the JS alert<br>
      	c. uses a variable<br>
      	d. uses a for statement<br>
      	e. uses the JS confirm<br>
      <p>
      Test Data: None<br>
      Output: Student Defined<br>
      Expected Code: Student must use one or more of 
      the above items in the submitted code.<br>
      Note: The above were all shown during class with 
      the exception of confirm which can be looked up 
      in the JS sourcebook.
      <p>
      <hr>
      
      <script language="JavaScript">
      
      // This is an example of in-line code
      
      	var Ret
      	
      	Ret = confirm ("Display Assignment Title");
      	
      	if (Ret) {
      		alert("The user pressed: "+Ret);
      		document.write("<h2>Assignment #1 Part A</h2>");
      		for (counter=1; counter < 10; counter++) 
      			document.write("WOW!!! ");
      		
      	}
      
      </script>
      
      </body>
      </html>
      
  • Review of Assignment #1 part B
    Audio (3.6M 7:56)
      <html>
      <head>
      <script language="JavaScript">
      
      	schedulePage = "http://courseweb.tac.unt.edu/gjones/fall2002/cecs5100/schedule.html";
      	thisPage = "assignment1b.html";
      	
      	function showConfirm ()
      	{
      		if ( confirm ( "Would you like to view the class schedule?" ) )
      			location = schedulePage;
      		else
      			location = thisPage;
      	}
      
      </script>
      </head>
      <body>
      
      Part 2: (5 pts)<br>
      Using JavaScript within HTML write an html/script that implements 
      the following pseudo code.
      <p>
      	a. Upon viewing the HTML page, display the course description 
      	for 5100<br>
      	b. At the bottom/after the course description html, provide a 
      	hyper-link to the schedule page on courseweb.unt.edu under 5100<br>
      	c. When the user clicks on the schedule hyper-link, the user 
      	is presented with a confirm dialog box asking if they wish to 
      	go to the new page or not.<br>
      	d. If the user presses  Okay, then the page changes to the 
      	listed URL for the schedule<br>
      	e. If the user presses Cancel, the page does not change.<br>
      <p>
      Test Data: None<br>
      Output: HTML as described, confirm dialog displayed on click of HREF 
      for schedule, and page changes to the schedule page on confirm OK<br>
      Expected Code: Student can use whatever JS code they wish to complete 
      the assignment.<br>
      Note: An example for this half of the assignment might be found on 
      the current 5100 course pages. <br>Hint: Remember to 'view source' 
      when looking at a web page.
      
      <p>
      <hr>
      
      <b><font color="#66007F"><font size=+1>Course Description:</font></font></b>
      <ul>A study of beginning computer programming using JavaScript, 
      Perl, and HTML.  Requires "hands-on" programming independent of 
      classroom instruction.  Topics include variables, simple and complex 
      data structures, object-oriented design, debugging, and language uses.</ul>
      
      <p>
      
      <a href="#1" NAME="1" onClick="JavaScript:showConfirm()">View Course Schedule</a> 
      
      
      </body>
      </html>
      


    Copyright 2003, Dr. James G Jones