CSCI351: Internet Programming

Assignment 3.    Due: Mar 20, 2026

Please submit your work to Canvas before 11:59pm of the day above.

  1. (10 points)   Modify the clock script to display time not in military form, but in AM/PM form. Leave only hours and minutes to be displayed. For example, "8:34 PM" should be displayed instead of "20:34".

    Name the source file hw4_1.html

  2. (10 points)   Modify the timer script to count minutes, seconds, and milliseconds. For example, "1.02.5" should be displayed instead of "62.5".

    Name the source file hw4_2.html

  3. (20 points)   Modify the timer script to transform it to a countdown. The script should accept an initial integer amount of seconds in the window (for example, "116"), count it down to 0, and stop upon reaching this value. Only the amount of seconds to countdown should be displayed (no milliseconds). Make sure to leave operational buttons only.

    Name the source file hw4_3.html

  4. (20 points)   Modify the solver script to compute and display the roots of the quadratic equation ax2 + bx + c = 0. Here a, b, and c are real coefficients entered by the user. The script, therefore, should have 3 input fields for input a, b, and c and also 2 other fields to display the roots.

    Name the source file hw4_4.html

  5. (20 points)   Modify the calendar script to display the calendar of the current month only. Furthermore, the days have to appear in the following order:
    Mo Tu We Th Fr Sa Su

    Name the source file hw4_5.html

  6. (20 points)   Design a script that makes the following cars move back and force within a 600-pixel area on the browser's window with a white background. If the car reaches the left or the right screen edge, it changes its direction and moves back. Have two buttons on your page for starting and stopping the car movement. It is up to you to make a decision concerning the car speed, just make it reasonable.

    Name the source file hw4_6.html