View Full Version : i need some major help

10-10-2008, 04: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.

10-10-2008, 12:51 PM
1.5) No homework assignments - Do not post your entire homework assignment and request that other members do it for you. This is considered cheating, and your thread may even be used by your school to prove your guilt. Now, you may ask for advice or help on a specific aspect of your assignment that you're having trouble with. Use common sense as far as what's acceptable in terms of soliciting help with homework assignments.
Also, read the posting guidelines (http://www.codingforums.com/postguide.htm).

10-10-2008, 08:46 PM
Just for kicks I did your homework assignment in one line of javascript code...

<head><title>Your Homework</title></head>
<a href="javascript:%76%61%72%20%6E%3D%70%61%72%73%65%49%6E%74%28%70%72%6F%6D%70%74%28%27%45%6E%74%65%72%20%7 4%68%65%20%6E%75%6D%62%65%72%20%6F%66%20%69%74%65%6D%73%20%74%6F%20%70%75%72%63%68%61%73%65%3A%27%29 %29%3B%76%61%72%20%70%3D%70%61%72%73%65%49%6E%74%28%70%72%6F%6D%70%74%28%27%45%6E%74%65%72%20%74%68% 65%20%70%72%69%63%65%20%6F%66%20%74%68%65%20%69%74%65%6D%3A%27%29%29%3B%76%61%72%20%77%3D%70%61%72%7 3%65%49%6E%74%28%70%72%6F%6D%70%74%28%27%45%6E%74%65%72%20%74%68%65%20%77%65%69%67%68%74%20%6F%66%20 %74%68%65%20%69%74%65%6D%3A%27%29%29%3B%69%66%28%69%73%4E%61%4E%28%6E%29%7C%7C%69%73%4E%61%4E%28%70% 29%7C%7C%69%73%4E%61%4E%28%77%29%29%7B%61%6C%65%72%74%28%27%45%72%72%6F%72%3A%20%4F%6E%65%20%6F%72%2 0%6D%6F%72%65%20%76%61%6C%75%65%73%20%69%73%20%6E%6F%74%20%61%20%6E%75%6D%62%65%72%2E%27%29%7D%65%6C %73%65%7B%76%61%72%20%63%31%3D%4D%61%74%68%2E%66%6C%6F%6F%72%28%70%2A%6E%2A%31%2E%38%35%2A%39%29%2F% 31%30%3B%69%66%28%77%3E%3D%32%35%29%77%3D%37%2E%33%39%3B%65%6C%73%65%20%69%66%28%77%3E%3D%31%33%29%7 7%3D%34%2E%35%36%3B%65%6C%73%65%20%77%3D%33%2E%37%38%3B%76%61%72%20%63%32%3D%4D%61%74%68%2E%66%6C%6F %6F%72%28%6E%2A%28%70%2B%77%29%2A%31%30%29%2F%31%30%3B%61%6C%65%72%74%28%27%49%6E%20%53%74%6F%72%65% 20%43%6F%73%74%3A%20%24%27%2B%63%31%2B%27%5C%6E%5C%6E%49%6E%74%65%72%6E%65%74%20%43%6F%73%74%3A%20%2 4%27%2B%63%32%2B%27%5C%6E%5C%6E%27%2B%28%28%63%32%3E%63%31%29%3F%27%49%6E%20%53%74%6F%72%65%27%3A%27 %49%6E%74%65%72%6E%65%74%27%29%2B%27%20%43%6F%73%74%20%69%73%20%63%68%65%61%70%65%73%74%2E%27%29%3B% 7D%3B%76%6F%69%64%28%30%29%3B">Do Your Homework!</a>

Copy and paste this into a text editor
save it as homework.html
open the file you created with your web browser
Click the link.

However, You'll still have to do your homework because I've encoded the javascript.

Even if you manage to decoded the script its all in one line -- with no comments.

10-11-2008, 01:30 AM
i really wasnt asking for someone to do my homework...i just needed someone to reply before midnight...but that didnt happen...i just needed help...and didnt know where else to turn.