Using Switch statement in XHTML
Hi..
im still new at Java and im battling with the following question..
If anyone could please help me..thanx.:(
a) Write a function minimum that returns the smallest of three floating-point numbers. Use the
Math.min function to implement minimum. Incorporate the function into a script that reads
three values from the user and determines the smallest value. Display the result in the status
bar.
b) A mail-order house sells five different products whose retail prices are as follows: product 1,
R2.98; product 2, R4.50; product 3, R9.98; product 4, R4.49; and product 5, R6.87. Write a
script that reads a series of pairs of numbers as follows:
a) Product number
b) Quantity sold for one day
Your program should use a switch statement to help determine the retail price for each
product and should calculate and output XHTML that displays the total retail value of all the
products sold in a week. Use a prompt dialog to obtain all input from the user.
Use a sentinel-controlled loop to determine when the program should stop looping and
display the final results.
|