Sale!

CSI3140 ASSIGNMENT 2 Solved

Original price was: $40.00.Current price is: $35.00. $29.75

Category:

Description

5/5 - (1 vote)

CSI3140 ASSIGNMENT 2

1. Write an embedded CSS rule using the style element that changes the color of all
elements containing attribute class = “greenMove” to green and shifts them down 25
pixels and right 15 pixels. Your html document must contain the necessary elements
to demonstrate the effect of the CSS rule. [10 marks]

Note: For each of the Questions 2, 3 and 4 below, build and render a web page that makes
the indicated effect(s) appear. Validate your page with the following validators:
 For CSS3: http://jigsaw.w3.org/css-validator/ (under More Options > Profile,
select CSS level 3). Some CSS3 properties may not validate because they are not
yet standardized.

 For HTML5: http://validator.w3.org/#validate-by-upload
Also, test your page with as many browsers as possible (e.g., Internet Explorer, Firefox,
Google Chrome, and Safari).

2. Make a navigation button using a div element with a link inside it. Give it a border,
background, and text color, and make them change when the user hovers the mouse
over the button. Use an external style sheet. [10 marks]

3. Create a div element with a width and height of 500px. Create a radial gradient with
three colors. Start the gradient in the bottom-left corner with the colors changing as
they move along the gradient line to the right. Make use of vendor prefix syntax for
WebKit- and Mozilla-based browsers, as well as the standard CSS3 syntax. [10
marks]

CSI3140 ASSIGNMENT 2 Page 2 of 2
4. Create an infinite animation of an element moving in a square pattern. Make use of
vendor prefix syntax for WebKit- and Mozilla-based browsers, as well as the standard
CSS3 syntax. [10 marks]

Note: The remaining questions require JavaScript programming. Your code should be
well written (e.g., variables declared, meaningful variable names, easy to understand and
no confusing shortcuts, meaningful functions, and useful comments, etc.).

5. Write a script (embedded in an HTML5 document) that reads in two integers and
determines and outputs HTML5 text that displays whether the first is a multiple of the
second. [10 marks]

6. A palindrome is a number or text phrase that reads the same backward and forward.
For example, each of the following five-digit integers is a palindrome: 12321, 55555,
45554 and 11611. Write a script (embedded in an HTML5 document) that reads in a
five-digit integer not starting with zero and determines whether it is a palindrome.

If
the number is not five digits long, display an alert dialog indicating the problem to
the user. Allow the user to enter a new value after dismissing the alert dialog. [10
marks]

7. A mail-order house sells five different products whose retail prices are as follows:
product 1, $2.98; product 2, $4.50; product 3, $9.98; product 4, $4.49; and product 5,
$6.87. Write a script (embedded in an HTML5 document) that reads a series of pairs
of numbers as follows:
a) Product number
b) Quantity sold

Your program should use a switch statement to determine each product’s retail price,
and should calculate and output a table that displays the total sales for each of the five
products. Use a prompt dialog to obtain the product number and quantity sold from
the user. Use sentinel-controlled loop to determine when the program should stop
looping and display the final results. [15 marks]

CSI3140 ASSIGNMENT 2