0% found this document useful (0 votes)
33 views2 pages

Com131 Assignment 4

This document provides instructions for assignment 4 for the COMP131 course. It states that: 1) The assignment is due on December 16th or 17th 2015 and must be submitted in hard copy to the lecture instructor. Late assignments will not be accepted. 2) The assignment must be individual work and copying will be considered cheating and could result in failing the course. 3) Students must turn in a hard copy of their complete HTML and JavaScript code along with a screenshot of their program running. It then provides details of the programming assignment which involves designing a webpage using HTML and JavaScript that allows a user to enter student marks and calculates an initial and final mark based on given grade percentages and rules. It

Uploaded by

ranin jojas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

Com131 Assignment 4

This document provides instructions for assignment 4 for the COMP131 course. It states that: 1) The assignment is due on December 16th or 17th 2015 and must be submitted in hard copy to the lecture instructor. Late assignments will not be accepted. 2) The assignment must be individual work and copying will be considered cheating and could result in failing the course. 3) Students must turn in a hard copy of their complete HTML and JavaScript code along with a screenshot of their program running. It then provides details of the programming assignment which involves designing a webpage using HTML and JavaScript that allows a user to enter student marks and calculates an initial and final mark based on given grade percentages and rules. It

Uploaded by

ranin jojas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Computer Science Department

COMP131 ( Fall 2015/2016)


Assign # 4 Due Date: Wed (16/12/2015) and
Thur(17/12/2014)(in lecture)
Notes:
1
2
3

The assignment should be submitted on the due date to your lecture


instructor in class. ( Late Assignments will NOT be accepted for any
reason)
The assignments are individual effort and copying the assignment will be
treated as a cheating attempt, which may lead to FAILING the course.
You need to turn in a hardcopy of:
a Your complete code (printout of your html and JavaScript file(s) ).
b Screen shot of one run of your program (html page).

Solve the Following question:


Design a webpage (using html and JavaScript) similar to the one shown below that
allows the user to enter a student's name and class marks and then calculates and
prints the initial and final mark for the student. The percentages of the grades are
as shown (mid Term Exam = 35%, Assignments = 10%, quizzes = 15%, and final
exam = 40%). All grades are entered between 0 and 100 (you may assume that the
user always enters the grade in the correct format). The initial mark calculated
must be rounded to the closest integer value (you may use the Math.round
function).
Your code should include at least the following two functions:
1) findMark which takes four parameters (midterm mark, assignment mark, quizzes
mark, and final mark) and returns the resulting student mark according to the
percentages above.
2) findFinalMark which takes the rounded integer value of the mark as a parameter
and returns the final mark of the student. The final mark is calculated as follows:

- If the sum of all the divisors of the mark (excluding itself) is equal to or higher than
the mark then 10 points should be added to the mark to get the final mark.
Otherwise, only 5 points are added.
You should make sure that any final marks that are greater than a 100 are printed
as a 100.
Your page format should look very similar to the following:

You might also like