
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Intro Computer Science; Subject: Computer Science; University: Loyola Marymount University; Term: Fall 2006;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Fall 2006
This assignment caps off our XHTML exploration by integrating it with the JavaScript programming lan- guage. This is a recurring theme in computer science — “interoperability” among multiple technologies.
We start by interacting with the JavaScript scratch page on the course Web site, after which it will be your turn to make a full XHTML page + JavaScript program from scratch.
Modify the first two programs that you wrote in Assignment 0921 (i.e., converting inches to centi- meters and calculating the average of n numbers) so that the input values for these programs are de- rived from the entry fields of the JavaScript scratch page on the course Web site. In both cases, have your program use Input 1 for the user’s input.
Adapt the third program from Assignment 0921 — “make change” — into a complete XHTML + JavaScript combination:
Do the assigned work electronically, then:
Look up and learn how to use the for-in loop (it looks like for (var i in array) { }) and use that in- stead of while in the average calculation program.
Allow the “make change” program to have custom- ized coin denominations — that is, let the user modify the available set of coins with which to make change. For example, instead of the “25, 10, 5, 1” set that we use, the user might want to make change with “20, 15, 3, 2, 1” denominations.