Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Java 2, JDK 5 Edition
This is the forum to discuss the Wrox book Ivor Horton's Beginning Java 2, JDK 5 Edition by Ivor Horton; ISBN: 9780764568749
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Java 2, JDK 5 Edition 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 8th, 2012, 12:22 PM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default java

how do i Write a java program that does the following:

A gasoline station charges 3.00 per gallon for regular, 4.50 per gallon for premium , 5.20 for diesel and 1.00 per Amp-Hr to charge an electric car(25 Amp-Hr to charge completely). In addition the station charges 12.00 for full service and 10.00 for quick and go service. There is no charge for self service. There is a 7.75% sales tax on the total gasoline purchase , 8% on the total diesel purchase, and 3% on the total for the electric car.
Your program should ask the customer whether he/she wants full service, quick and go, or self service. The type of fuel or charging should be asked for next. Then the amount of fuel or charge desired.
Your program should then calculate the bill specifying the type of service, type of fuel, amount of fuel/charge, the sales tax paid, and the final total.
A message of appreciation should be printed at the end.
Reply With Quote
Reply


Thread Tools
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
To call a java class from javascipt and pass a variable to the java servelet too prithagupta Java Basics 4 March 9th, 2013 07:39 AM
java version "1.6.0_24" Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java Hot Nixxxter Java Basics 6 January 11th, 2012 11:36 AM
Java SE Development Kit and Eclipse IDE for Java EE? Droider BOOK: Beginning Android Application Development 1 October 7th, 2011 08:42 AM
Root Cause:java.lang.NoSuchMethodError: java.util. anees81 JSP Basics 3 March 1st, 2011 07:55 AM
Java Code - Wrox - Beginning JAVA - Ivor Horton ponguru Java Databases 3 May 18th, 2006 12:30 PM



All times are GMT -4. The time now is 11:01 PM.


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