puglover
10-10-2008, 03:01 AM
hi i am new to this forum and am hoping someone can help me out big time. i am taking a javascript programming course in college and i have a project due at midnight tonight(EST). i have absolutly no clue as to how to do the project. this is what i have to do..if someone could help me it would be amazing!!
Purpose: You are to write a program that calculates the cost of purchasing some number of a particular
item using two different purchase methods. The program should display the final cost for each method as
well as the method that results in the lowest cost.
Your program should accomplish the following:
● Prompt the user to enter the number of items purchased, the cost of the item, and the weight of
the item.
● Calculate the cost assuming that as an employee of a large department store you receive a 10%
employee discount and must pay the local sales tax of 8.5%.
● Calculate the cost assuming that you will be purchasing the item via the Internet. You will not
have to pay sales tax, but will have to pay a shipping charge according to the following schedule.
Weight Cost
0 - 12 3.78
13 - 24 4.56
over 25 7.39
● You should display the total cost of the purchase for each purchase purchase method, with an
appropriate label. Note: You are not required to display any of the intermediate results. You
should then display a message stating which method results in the lowest cost.
Code Requirements
● Proper indentation is required.
● You must include comments at the top of your program containing your name, class, instructor
and due date, and purpose of the project.
Include plenty of documentation. The problem is broken down into 4 steps; you must include a comment
before each step. The comment box should state the purpose of the next group of statements.
Purpose: You are to write a program that calculates the cost of purchasing some number of a particular
item using two different purchase methods. The program should display the final cost for each method as
well as the method that results in the lowest cost.
Your program should accomplish the following:
● Prompt the user to enter the number of items purchased, the cost of the item, and the weight of
the item.
● Calculate the cost assuming that as an employee of a large department store you receive a 10%
employee discount and must pay the local sales tax of 8.5%.
● Calculate the cost assuming that you will be purchasing the item via the Internet. You will not
have to pay sales tax, but will have to pay a shipping charge according to the following schedule.
Weight Cost
0 - 12 3.78
13 - 24 4.56
over 25 7.39
● You should display the total cost of the purchase for each purchase purchase method, with an
appropriate label. Note: You are not required to display any of the intermediate results. You
should then display a message stating which method results in the lowest cost.
Code Requirements
● Proper indentation is required.
● You must include comments at the top of your program containing your name, class, instructor
and due date, and purpose of the project.
Include plenty of documentation. The problem is broken down into 4 steps; you must include a comment
before each step. The comment box should state the purpose of the next group of statements.