Sale!

SOEN 287 Assignment 2 solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (3 votes)

Question #1: – Formatting a list and table/External style sheet (5 pts)
Script the webpage in figure 2 using an html file for the format and content and an external CSS
file for the presentation. You choose the topic; here are a few ideas: cars, animals, sports, foods
….
Here are the specifications:
1. The background of your page has a repeated image of your choice.
2. The header must be formatted using the box model.
The image to the right illustrates the CSS box model.
To accomplish this use the

tag. You can use any
color combinations for the border and the background.
The color of your header must be the same color as the
border of the box model. Set the margin of the box
model to be the same as the margin of the table that
follows (so they line up nicely). Set the border to be at
least 10px and solid. Set the internal padding to be at
least 10px. Set the width to a value of your choice other than
100%.
3. The table must have 3 rows and 2 columns.
a. Set the table margin the same as the header margin.
b. Set the border of the table to be at least 15px, dashed and a different color from
any other colors in the table.
c. The 1st row is for headings. The background color must be different from
any of the other cells in the table, and the text must be any color other
than black. Add a padding of at least 10px for the heading cells.
Concordia University
SOEN 287: Web Programming 1 – Fall 2018
Assignment 2
d. The cells in rows 2 and 3 must all have a different color background and a
different colored border.
e. The cells in the column 1 of row 2 and 3 each have an ordered list whose list
style is upper roman. Notice that the numbering of the list items in the cell col
1/row 3 starts at 3 (and not 1).
f. The cell in row 2/col 2 has an ordered list whose list type is uppercase letters.
The 1st nested unordered list has bullets that are a 25px x 25px image of your
choice and first element of this list has one nested unordered list. The second
nested unordered list’s bullets are the default circle. The color of the text in the
2 SOEN 287
nd unordered list is the same as the border of that cell.
g. The cell in row 3/col 2 has an ordered list whose list type is hiragana numbering.
The 1st nested unordered list’s bullets are square. The 2nd nested unordered list
has bullets that are a 25px x 25px image of your choice, different from the image
used in cell Row 2/col 2. The color of the text in the 1st unordered list is the same
as the border of that cell.
4. All style need to be entered in an external CSS.
5. Be sure to include your name in the page as well as the sources of your images with
links to the pages at a location of your choice.
6. Validate your code using the HTML5 validator.
1. Figure 2 – Template of page to script for question #1
Concordia University
SOEN 287: Web Programming 1 – Fall 2018
Assignment 2
Question #2:
Write a script that prompts the user to enter numerical data until they enter -1. The program
displays the following results:
• The number of entries
• The number of values which are multiple of 3.
• The number of values which are multiple of 5.
The program should check for non-numeric and empty values and should ignore that data.
Here is a sample to illustrate the expected behavior of your program if you enter 10, 15, 14, 21,
A, 17 and then -1 :
Concordia University
SOEN 287: Web Programming 1 – Fall 2018
Assignment 2
Question #3:
Write a script in the head section that shows the multiplication table of the numbers from 1 to 5.
The program displays the resulting values in HTML5 table format including the width = 50% and
border = 1, as below:
Note: You don’t need to develop any function to calculate the square and cube of these
numbers.
Question #4:
Write a function Patternmatch in JavaScript language declared in the document head section.
This function takes a parameter an array of strings called names. This function returns the
number of names in the given array that end in either “ly” or “ne” patterns and they have also at
least one ‘a’ in their names.
The test driver of the program must be defined as a script in the body section, including the
declaration of the array and the invocation of the function. Use this following data of the array
(names):
Names = “bradly”, “anna”, “john”, “sherly”, “adriane”
The array must be created as an instance of the class Array using the “new” operator.
The program displays the result as follows: (the table on top has a dotted border style, the text
and background have different colors and their colors are different from the border color. Use a
separate css file for the style)
Concordia University
SOEN 287: Web Programming 1 – Fall 2018
Assignment 2
Hint:
• Use the loop : for
• Use the existing method search() to provide you the position of these patterns in the
array.
Submitting Assignment #2
– Zip the source code (the .java only please) of this assignment.
– Naming convention for zip file: Create one zip file, containing all source code files
for your assignment using the following naming convention:
 The assignment is done by 1 student:
The zip file should be called a#_studentID1, where # is the number
of the assignment studentID is your student ID number. For
example, for the first assignment, student 123456 would submit a
zip file named a2_123456.zip
– For submission instructions please refer to the course web page.
– Assignments not submitted to the correct location or not in the requested
format will not be graded.Concordia University
SOEN 287: Web Programming 1 – Fall 2018
Assignment 2
Evaluation Criteria or Assignment #2 (20 points)
JavaScript Source Code Points
Question #1 (5 pts.)
Page background & Header 0.5 pt.
Table properties 0.5 pt.
Row 1 1 pt.
Row 2 1 pt.
Row 3 1 pt.
All style are to be entered in an in-document style sheet 0.5 pt.
sources of your images with links to the pages (or name of image) 0.5 pt.
Question #2 (5 pts.)
Declaring and initializing variables 1 pt.
Prompting user/reading data 1 pt.
Using the while statement 1.5 pts.
Ignore invalid inputs 1 pts.
Displaying the results 1.5 pts.
Question #3 (5 pts.)
HTMT5 table format with different tags 1.5 pt.
Calculating the multiplication table from 1 to 5 1 pt.
Displaying the result in the table 1 pts.
Question #4 (5 pts.)
Function NbnamePattern(names) described in head section 2 pt.
Using loop : for 0.5 pt.
Using the If statement 0.5 pt.
Tester described in body section 1.5 pt.
Display the proper result 1 pt.