Date: Wed, 17 Nov 2004 19:00:45 -0600 (CST) From: Mark Jacobson To: 810-022-01@uni.edu Subject: [810-022-01] Take home test handed out today... Hi 022 students, Here is the take home test that was handed out today in class. (Be sure to get the yellow handout on Friday if you missed class today, as well as the supplemental handout on the RAND and the INT functions for PERL). ------------------------------ 810:022 MASI take-home "exam". Due date: See class web page. ------------------------------ http://www.cns.uni.edu/~jacobson/c022.html Note: This is an EXAM. You cannot help each other or work together on this. It is an EXAM, not a homework. ---- 1. Create an application for your web page using PERL/CGI and the necessary HTML and FORM material we have been learning from the textbook and handouts and lectures. Your application allows the user to do birthday simulations like we did with our Excel VBA macros. You will want to study and review the Excel birthday macros from the lecture notes and the web site for our class. a. Turn in the .html code, for example, your file might be named birthday357.html (if the last 3 digits of your student ID are 3, 5 and 7). Your .html web page, whatever it is named, will let the user RUN ONCE the simulation or RUN 1,000 times the simulation. You can do this with two separate buttons, but there are other ways to do it too, while having only one submit button. Your .html web page, will also let the user choose different size groups. The default can be 23, and you can have that default, for convenience, be there in the textbox on your FORM, if you like. That way, the user (which could be YOU), does not have to type in a value every time they hit the REFRESH button or arrive at that page. n = 23 is the birthday simulation size we are used to, but it will be fun for you to try n = 30 and n = 50, to see how many times there are DUPLICATES or REPEAT BIRTHDAYS. With n = 30, it will be above 500 out of 1000 groups, but how much above? b. Turn in a diagram drawing of what your .html user interface will look like. You will do this BEFORE you write the HTML for the page. This page has the FORM! c. Turn in the HTML for this page, hand-written. This .html file you will also turn in a printout of, but you must have a trail of hand-written notes, including this .html code. You do NOT have to rewrite it AFTER you type it in on cowboy.cns.uni.edu and get it all corrected, if there were errors. However, with a different color pen, you can indicate where you made errors that had to be corrected. d. Turn in a diagram of the output the .cgi will produce (sample output). You will do this for: i. run once problem. this will show the 23 birthdays, or the 30 or 40 or 50 or 16 birthdays. indicate any plans to show duplicated birthdays as BOLD and/or in a different color. We want them to stand out! ii. run 1000 times problem. this will obviously just show a summary of the how many groups out of 1000 had a repeat birthday and for what size group we are talking about (30, 40, 50, 75, 15, or 23, etc.). e. turn in the HTML that you would see if you did VIEW menu, Source for d.i. above, and for d.ii. above. This will be hand-written. You should circle or clearly indicate which things are different for each run of the .cgi script. For example, it might be: You had 583 out of 1000 groups with repeat birthdays for groups of size 30. Obviously, you would circle the 583 and the 1000 and the 30, as they either depended on the PERL script's random results or on what the user typed in and chose, 30 instead of tyhe usual size 23. These two HTML plans will be the basis for writing your PERL script. Write them BEFORE you try to write the PERL script! f. Turn in the PERL script, the birthday.cgi program you wrote, whatever you name it. Get a printout of it AFTER you have it working, but you can turn in various phases of the printouts as you debug it and get it working and add to it, to record your process of arriving at your final version. Turn in your hand-written, original version PERL script too, and ALL of the many notes and ideas, including scratch paper messiness and review of and reference to page numbers and code snippets or concepts from the book or handouts will be turned in too. 2. Turn in your development notes for the entire project. This will be a BIG portion of the grade on this take-home "exam". In the above discussion, many references are made to things that are page of these "development notes". 3. I will add some new comments to this as we go, so check out the web page often. I am going to try to add a last question that requires you to connect it up to Ghostbusters and that problem solving metaphor before Thanksgiving break. I will finish talking about this on Friday in class and then we will move on to database concepts and back to some Excel VBA macro skills again too. Mark -------------------------------------------------------------------- Note: This is an EXAM. You cannot help each other or work together on this. It is an EXAM, not a homework. ---- It is not due until AFTER Thanksgivng break, the web page tells the details: http://www.cns.uni.edu/~jacobson/c022.html --------------------------------------------------------------------