Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

Assignment- Computer Applications for Business

Learning Objectives:

This assignment is designed to practice:

1. Basic understanding of JavaScript variables, including;

a The declaration, initialization and assignment processes

2. Obtain user input by via the prompt() function and present output to the user through the alert() function

3. Data type conversion in variables (strings to numbers, convert to upper case)

4. Use of the conditional if and if/else statements

5. Use of arithmetic and logic operators

6. Use of comments

Directions:

You are provided an html program. Your responsibility is to insert the JavaScript statements that will solve the problem discussed below, and to comment the html file with the requested information per the requirements.

For the JavaScript, you will only complete the section inside of the

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 3 points
• If a customer purchases 2 books, they earn 7 points
• If a customer purchases 3 books, they earn 12 points
• If a customer purchases more than 3 books, they earn an additional 5 points on top of the 12 points for each book above 3.

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, 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. You will then add JavaScript code to the provided assignment6.html skeleton file within the

4. A typical program flow would declare the variables needed to solve the problem, initialize the variables, solicit input, perform the data manipulation and/or calculations and display the result.

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. You will utilize prompt() functions to request input from the customer. Your message should be descriptive enough to solicit data from someone not familiar with the assignment.

7. You will utilize the alert() function to display your output as a clear and unstandable message to the customer.

8. 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.

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

Additional Information:

Since the contents of a text box, which is what the prompt() function generates, is going to be used in mathematical operations, use the function parseInt() to convert the text to a number. Otherwise your calculation operations will not perform as expected.

Example: variableName = parseInt(variableName)

To simplify the comparison of solicited text, it is often easier to convert this text to upper case. Example: variableName = variableName.toUpperCase();

References:

Fluency 6 - Chapter 17 • Fundamental Concepts Expressed in JavaScript w3schools.com • http://www.w3schools.com/js/default.asp
Firefox Tools - https://developer.mozilla.org/en-US/docs/Tools/Debugger
Lectures' slides and examples Recitation.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92078835
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Programming Language

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Background informationthis assignment tests your

Background Information This assignment tests your understanding of and ability to apply the programming concepts we have covered throughout the unit. The concepts covered in the second half of the unit build upon the fun ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

  • 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