Home   Video/Audio Library     Course Archive   Papers Archive   Beyond the Box   CV   Service My Keeper Shelf   Cultural References in Class

Home page for Professor Haynes'

COSC 231: Internet Computing
WINTER 2015


Office hours Winter 2015

M 1 - 2 pm
T 1 - 2 pm
W 1 - 2, 3:30 - 4:30pm
T 1 - 2 pm


Textbooks and Resources:


1. Lecture notes
Date Topic Notes Reading
4/15 Intro to intellectual property
4/13 Java multi-threading example (array of workers)
4/8 Homework due 4/15/2015
4/6
4/1 NoGUI.java
Simple.java
ButtomDemo.java
3/30 Javascript object orientation 0330.html Introduction to Object Oriented Javascript
3/23 More DOM surgery -- new inlab below
3/16 Practice your DOM surgery -- see inlab below
3/11 Regular expression Practice your regular expression chops
3/9 Beginning regular expressions
Simple example
3/4 JavaScript and HTML DOM
especially Window, Navigator, Screen, History, Location
3/2 Animation
Flood-it
2/16 Timers:
http://www.w3schools.com/js/js_timing.asp
Updated slide show
2/11 Array, object: click here
2/9 JS: for loop
JS: changing style
Code modified inclass: changing style
2/4 CSS positioning
Beginning Javascript -- syntax
simple JS example
Keith: Chapter 2
1/28 Continue CSS: links, list, table, *box model*, dimension, display
1/26 Starting CSS: intro - fonts; HTML span and div w3schools
1/14 form, input radio button (two groups), select, textarea
image maps, intro to DOM
Code in class: form elements form elements image map example DOM
1/12 <table>, <rowspan>, <colspan>, <caption>, <ol type="1">, forms Today's code: Tables,   Ordered lists and color ,   form example continue W3schools tutorial
1/7/2015 Intro to HTML http://www.w3schools.com/html/default.asp




2. Assignments Due 4/8
Date Assignment Upload destination Comment/notes
4/6 Write a Java GUI that
(1) displays the keyboard for a phone ( [[1, 2, 3], [4, 5, 6], [*, 0, #]] ) in the middle of the JFrame.
(2) At the top of the JFrame, echo the numbers/symbols the user has punched in -- as they are being entered.
Optional: format the numbers xxx-xxxx or xxx-xxx-xxxx while they are being entered.
Upload to 231/lab0406.java
4/1 Write a GUI that will calculate the volume of a rectangular cuboid Upload to 231/lab0401.java Due 4/6
3/25
  1. For this HTML page, use JShint to identify warnings. Fix the warnings and the logic error. Turn in paper copy of original file with warnings circled.
  2. Using Firebug, trace the function entry values and exit values for an implementation of the Fibonacci sequence. (Go to source of all wisdom and knowledge for Fibonacci sequence)
    Code demo in class (using alerts as scaffolding instead of Firebug utilities) HERE
Due 3/30
3/23 More DOM surgery practice. Create an HTML page with one button. When the button is clicked, create a popup offset from the original. In the popup, CREATE two paragraphs and add to the popup's DOM:
  • paragraph 1 contains YOUR name
  • paragraph 2 contains "COSC 231 Internet based programming"
3/16 Generate 3 paragraphs or divs. The text in each should be "the tick", "noisy colors", "calibrating", respectively (or other). Under mouse control (drag and drop), reposition the three divs to form different permutations.
The order of the divs (paragraphs) must be reflected in the order of children in the DOM.
Demo will include showing the DOM in Firebug.
231/lab0316.html Due 3/18
3/23
3/11 Write a short Javascript program that will read in a string. The string is supposed to contain zipcodes, each separated by one or more blanks. Using String methods and Regular expression methods, test each entry for a valid zip code. Return the first invalid zipcode found
Use zipcodes: 48103, 48104, 48105, 48106, 48197, 48198
231/lab0311.html Due 3/16
3/9
  1. Write and demonstrate a regular expression that will recognize legal names of JS identifiers
    Do NOT worry about length limitations of the JS name
  2. Write and demonstrate a regular expression that will recognize an emoticon in the set { :-) , :-D, ;-), :-( } and no others.
    Test for the presence of the emoticon anywhere in the input string
231/lab0309.html Due 3/11
3/4 Using HTML and Javascript, when the page is loaded, automatically create a popup window that is 1/2 the size of the original page, offset to the right and down from the original page, with the focus on the popup page.
Do not do anything more than specified.
231/lab0304.html Due 3/9
3/2
  1. Modify or rewrite jumping jack to move in the y direction as well as in the x direction
    that is, there is a deltaY = 5 and a deltaX = 5
  2. Modify Jan Wolter's flood-it program to give two levels of difficulty:
    hard -- the same number of allowed moves as in the original program
    easy -- 25% more moves allowed as in the original program.
    Use the same style of user input -- parse the url for the difficulty
Upload to 231/labJack.html and to 231/labJan.html /td> Due 3/4
2/16 Display a picture.
Count down 5 seconds, displaying 5, 4, 3, 2, 1 in turn, next to the picture.
Display a rocket blasting off or an explosion in the place of the original picture.
231/lab0216.html Due 3/2
2/11
  • Write a little arithmetic training app. From the numbers 0 - 9, present two randomly chosen numbers.
  • User has to return the sum of the two numbers.
  • Tell the user if he is correct or incorrect and give the correct answer.
  • Repeat five times.
  • Give appropriate feedback and prompts to users.
Upload to 231/lab0211.html Due 2/16
2/9 (1)Create HTML plus Javascript:
  • Ask the user for two numbers,
  • Ask the user to enter 1 for addition, 2 for subtraction.
  • Return the arithmetic result on the input.

(2) Create HTML plus Javascript:
  • On your Mondrian lab: Assign ONE div (or tds) to one id, another to a different id
  • Add a button
  • When the user clicks the button, change the first id div (td) to color green and the second id div to color gold.
231/lab0209.html

231/lab0209a.html
Due 2/11
1/28 Create a piece of art in the style of Mondrian using divs or table and background colors. At least 7 divs (or td elements)
231/lab0128.html Due 2/2
1/26 (1) Take the w3schools HTML quiz -- show Eddie your quiz score (must earn 18/20 or above!)
(2)Style your index.html page to contain a background image, using at least one background color, at least two different text styles -- use inline CSS;
(3)Make a copy of your index.html page to index1.html. Style it as before, but use only internal CSS.
to index.html and index1.html Due 1/28
1/14 Create an HTML page that has a picture of your row of classmates. Each classmate is labelled with his name using image map. On this page, make a form with a drop down selection list with the names of the classmates. Upload to 231/lab0114.html Due 1/21
1/12 Create a table with example double dactyls of at least four entries (rows) using HTML.
First column is a double dactyl, Second column is the author of the poem, third column is link to URL, fourth column is a relevant image (found on web)
For double dactyls see: (1) Peter Blinn's
(2) Guy Steele's (famous computer scientist)
(3) Collection by Alex Chaffee
Table should have header row: Double dactyl, Author, Link, Image. Table should have caption "Examples of Double Dactyls"
upload to 231/lab0112.html Due 1/14
1/7/15 Create a meaningful home page with no errors or warnings on Firefox.
Include the following tags: <title>, one or more of <h1> - <h6>, <ul>, <li>, <img>, <p>, <hr>, <a>, <br>
To your people account: index.html Due 1/12


3. Projects
Assignment Date delivered Date Due Other
Java GUI: speed reading 4/13/2015 4/20/2015
Multi-threaded Java app 4/8/2015 4/15 4/17/2015 TenThreads.java:
worker threads find local max,
then main finds global max
Project #4 Battling for Gold 3/23/2015 4/8/2015
Project #3 Move a Sprite 3/4/2015 3/18/2015 3/23/2015 Upload to 231/Projects/pp3.html
Project #2 Slide Show 2/11/2015 3/4/2015 Upload to 231/Projects/pp2.html, etc
Project #1 create a picture 1/31/2015 2/16/2015 Upload to 231/Projects/pp1.html


4. Quizzes and Tests

5. General (Syllabus, Calendar, etc.)

6. Resources


Last changed: