p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Java Basics (http://p2p.wrox.com/forumdisplay.php?f=199)
-   -   Using Switch statement in XHTML (http://p2p.wrox.com/showthread.php?t=58532)

Lizane May 30th, 2007 02:11 AM

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.


ciderpunx June 15th, 2007 06:46 AM

Let's see what you've written so far

--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock: http://charlieharvey.org.uk


All times are GMT -4. The time now is 12:10 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.