Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask E-Commerce Expert

Computer Applications for Business Assignment

JavaScript Event-Driven Programming

To get credit for this assignment:

Learning Objectives:

This assignment is designed to practice:

1. Understand the basic input and output mechanisms of dynamic web applications from the code perspective
2. Implement JavaScript code which will handle user events
3. Display feedback of said processed interactions back to the user
4. Practice your understanding of basic JavaScript from the prior Assignment
a variables, including;

i The declaration, initialization and assignment processes

b Use of the conditional if statements
c Use of arithmetic and logic operators
d Use of comments

Directions:

You are provided an HTML program. Your responsibility is to insert the HTML tags with the appropriate JavaScript statements that will solve the problem discussed below, and to comment the html file with the requested information per the requirements. The problem description and HTML program provided are slightly different from Assignment. Be sure to start fresh.

Problem to solve:

The Serendipity Booksellers has a book club that awards points to its customers based on the number of books purchased each month. The points are awarded as follows:

• If a customer purchases 0 books, they earn 0 points
• If a customer purchases 1 book, they earn 4 points
• If a customer purchases 2 books, they earn 8 points
• If a customer purchases 3 books, they earn 16 points
• If a customer purchases more than 3 books, they earn an additional 7 points on top of the 16 points for each book above 3.

Serendipity Booksellers also awards points based on the dollar value spent on non-book merchandise. Four points are awarded for every $10 spent. Partial awards are not provided. For example, 4 points will be awarded for spending $10.00 up to $10.99. No points are awarded for less than $10.

Preferred Customers receive a bonus of double award points.

The Serendipity Booksellers website needs to be updated to ask the customer to enter the number of books purchased last month, the dollars spent on non-book merchandise, confirm if they are a Preferred Customer, and then calculate and display the number of award points earned.

Requirements:

For this assignment;

1. Your program will calculate the award points as described above.

2. You will generate HTML comments to add your name, section and TA name. Each on a separate line within the tags. This will (should) NOT be visible in the document on the web browser).

3. Utilize a tag

4. You will then add the HTML tags with the proper JavaScript code to produce:

a. A textbox to solicit the number of books purchased
b. A textbox to solicit the dollars of non-book merchandise
c. Grouped radio buttons to determine Preferred Customer membership
d. A button to calculate the number of points awarded
e. A readonly textbox to display the result the calculation

5. Utilize JavaScript comments to explain the steps you are preforming within your code. A JavaScript comment's form is:
/* Place your comment between the stars */

6. Variable names should be descriptive. For example, if a program is calculating the total charge for a bill at a restaurant, it may have a variable named tipAmount.

7. Utilize at least one if/else statement. Consider using the if/else in determining the bonus points.

A sample of what your webpage could look like:

1503_Sample.jpg

Additional Information:

Since the contents of a textbox, is going to be used in mathematical operations. Textboxes sometimes treat input as Strings. Use the function parseInt() to convert the String text to a number. Otherwise your calculation operations will not perform as expected.

JavaScript provides several math utilities. The Math.floor() method rounds a number DOWNWARDS to the nearest integer, and returns the result.

References:
Fluency 6 - Chapter 17 • Fundamental Concepts Expressed in JavaScript

- Chapter 18 - A JavaScript Program w3schools.com • http://www.w3schools.com/js/default.asp

Firefox Tools - https://developer.mozilla.org/en-US/docs/Tools/Debugger

Lectures' slides and examples

E-Commerce, Computer Science

  • Category:- E-Commerce
  • Reference No.:- M92076087
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in E-Commerce

Mobile web application development assignment - android

Mobile Web Application Development Assignment - Android Apps Development Purpose of the assessment - Students are required to design and develop four different Apps. Apply Java programming concepts, models/architectures ...

Html - css assignments assignment 1 - internet programming

HTML - CSS Assignments Assignment 1 - Internet Programming   My grandfather, like many men who lived in rural America, owned a large machine shed where he stored tools, farm equipment, vehicles, lumber, and wonderful gad ...

Overviewassignment 2 asked you to build the front end of

Overview Assignment 2 asked you to build the front end of the assignment, now the client wants you to build the full eCommerce website to the point that orders can be made and stored in a spreadsheet. Requirements 1. Web ...

Assignment requirementsyour web site proposal and

Assignment Requirements Your web site proposal and presentation (Assignment 1) was accepted, subject to any feedback you may have received. You company has been asked to develop website you suggested and build the featur ...

Assignment - creating dynamic websites and web-based

Assignment - CREATING DYNAMIC WEBSITES AND WEB-BASED APPLICATIONS - AN OVERVIEW This assignment is an overview of the concepts, technologies and design techniques required to build dynamic websites and web-based applicat ...

Research and discuss html 5what are its main featureswhat

Research and discuss HTML 5. What are its main features? What resources are available to support it? Put it in your own words please.

Create testcase for given project first use piki design to

Create testcase for given project, first use piki design to do test case Want to do it like testcase one file and you can also get right information from saeed testcases Want to piki design all of it and informat like te ...

Secure electronic commerce assignment -part a -based on

Secure Electronic Commerce Assignment - Part A - Based on your practices in labs, develop an online e-commerce (shopping) system using html, javascript and php. You can assume any products for sales. Please create a fold ...

Mobile applications assignment - an ios recipe application

Mobile Applications Assignment - An iOS Recipe Application - Introduction - In this assignment, you will create a simple Recipe application for iOS using Xcode (Swift). This application allows users to view food recipes. ...

Purpose of the assessment with ulo mapping students are

Purpose of the assessment (with ULO Mapping) Students are required to design and develop four different Apps. Students will be able to: b. Apply Java programming concepts, models/architectures and patterns to Android app ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As