Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Password Reminder
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #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

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
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.

Reply With Quote
  #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

Let's see what you've written so far

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

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

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