Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

1. Create php 09 array 03.html with this content:

a. A form that posts to php 09 array 03.php with this text and these objects:

  • DELIMITER Input box with id and name: 'delimiter'
  • DATA Input box with id and name: 'delimitedListOfWeights' 
  • MAX FREE Input box with id and name: 'maxWithOutSurcharge'
  • RATE Input box with id and name: 'surchargeFactor'
  • Submit button with face GO and id 'go'

 b. TEST: Click GO on menubar and it should look like this:

2. Create php 09 array 03.php which does this:

a. Receive the four values posted from php 9 array 03.html

b. Use $delimiter to make an array of $delimitedListOfWeights ($delimitedListOfWeights is a delimited list)

TIPS:

Use explode(...) to make the array. Search e-book for: explode

In JavaScript you used split() to make an array from delimited data. In PHP use explode(...)

c. Using a loop to process all array values and compare each value in list to $maxWithOutSurcharge

  If an array value is more than $maxWithOutSurcharge 

(1) Compute the amount of array value over $maxWithOutSurcharge

(2) Multiply that amount by $surchargeFactor.

(3) Add result to $total.

  TIP: A common mistake is to compare using the array variable and forgetting to compare specific array

      values instead of individual array values by using [...].

e. Echo a span with id 'result' that contains the value: $total

 3. Example of how to process the data

Assume these values:

delimiter: g

delimitedListOfWeights: 200g345g100g500

maxWithOutSurcharge: 300

surchargeFactor: .1

In this example total would be:

(45 * .1) + (200 * .1) ==> 4.5 + 20 ==> 24.5

Explanation:

345 and 500 are greater than 300.

The amount greater (45 and 200) are multiplied by .1 and added to the total

Java, Programming

  • Category:- Java
  • Reference No.:- M92753489
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Java

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

  • 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