Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
| Search | Today's Posts | Mark Forums Read
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 30th, 2007, 02:11 AM
Authorized User
 
Join Date: May 2007
Location: East London, Eastern cape, South Africa.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

  #2 (permalink)  
Old June 15th, 2007, 06:46 AM
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Let's see what you've written so far

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
switch statement crmpicco Javascript How-To 3 March 9th, 2015 10:37 PM
Switch-statement grstad C# 3 June 11th, 2008 06:53 AM
switch statement seymour_glass C# 5 January 24th, 2007 12:08 AM
C# switch statement nalla General .NET 4 December 14th, 2005 05:31 AM
build switch statement to make dynamic crmpicco Javascript How-To 0 October 27th, 2005 05:44 AM





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