You are on page 1of 5

Assignment Number 4

Total: 100 Marks

Due: See Course Calendar

This assignment serves as an introduction to the use of JavaScript. You are to build an
interface and program for E-Marks Incorporated. E-Marks allows a student to buy
the marks that you need to be successful at University. You will be submitting only the
JavaScript page html document for marking. There will be a subtraction of 10 marks
for each item that is not in your assignment. There will be NO EXTENSIONS on this
assignment.
Part A (50 Marks)

a) The screen below has been designed to input the values for your mark request. Design a
screen similar to the one below and use a table in your design. Note the values are only
for display and you would have to enter them when you run your program. Note that
your form should put the value of 0 (zero) in the number of courses and the total cost.
Put an appropriate title on the screen.

b) Insert two command buttons, Go for it, and Clear and Reset

c) Insert the following checkbox


d) Add a text area to your screen design to show a summary of your request.

e) Create a second text box that looks like the following. It will be empty until you use
the command buttons

f) Create the radio buttons which give the reasons for your request.

g) Create a Select Box option as shown on the right. Have 3 options displayed when the
arrow on the right is clicked: “First Time Users”; “Frequent Fliers”; and “Buying a
Degree”.

h) Your Final form will look something like the image below and will include all of the
same items that mine does. The form is worth 50% of your grade for this assignment.
Part B (30 Marks)

a) Write the code to support the actions of the mark purchasing process. When the Go For
it button is pushed, the cost to the student is generated. To purchase 1 to 4 marks costs
$5 per mark; 5 to 9 marks costs $10 per mark; and over 9 marks costs $15 per mark.
The number of courses is counted and displayed in Number of courses. Display the
accumulated cost for all courses in total cost. The code must work correctly inside the
Number of Courses and Total Cost boxes to receive any marks.

b) Distance education courses cost an additional $50. Modify the code in the Go for It
button to add this amount when this checkbox has a tick in it.

c) Add the code for the first text box in your form as shown below. Modify the Go For it
button to display your student id at the top. On the lines under it, the count for the
course, course number, description, the marks requested, only distance education
courses have a “DE”, cost for this course and the total cost are displayed. The code must
work to receive any marks.

d) Enter the code for the second text box in your form as shown below. Modify the code in
the Go for It button to display the simple '*' graphs as shown to the right. One star is
displayed for each $10 of the total cost. One line of stars appears after the Go for it
button is pushed. The number on the left-hand-side indicates the total cost. The stars
must show correctly to receive any marks.

Part C (10 Marks)

a) When the total cost is over $250, the message, Request Denied – Clear and Reset,
appears in the window as shown on the right.

b) Create the code for the radio buttons you previously created. “Doctor Note” has no
addition costs; “Lack of Work” adds 20% to the cost for this course; and “Some
Compassion” has an additional cost of 5%. When you start your program, the '.' is
displayed in the “Doctor Note” option. Modify the code in the Go for It button to
include these changes.
c) Create the code for the select box you previously created. “First Time Users” get the
“Thanks for using E-Marks” message to show up as below. (only once – the first
time the Go For It button is pushed). The code must work to receive any marks
• Frequent Fliers get a 25% discount on the course when it is selected.

• “Buying a Degree” gets a 50% discount on the course when it is selected.

Part D (10 Marks)

a) You created the Clear and Reset button earlier When the button is pushed, the
display areas are cleared; number of courses and total cost is set to zero; Distance
education is cleared; and “Doctor Note” has a period in it. The code must work to
receive any marks.

You might also like