Wrox Programmer Forums
Pro Java Expert level Java questions not about a specific book. Please indicate your version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Java 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
Old February 7th, 2012, 11:39 PM
Registered User
Join Date: Feb 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default java

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.

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 08: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 12:36 PM
Java SE Development Kit and Eclipse IDE for Java EE? Droider BOOK: Beginning Android Application Development 1 October 7th, 2011 08:42 AM
java.security.SignatureException: java.lang.ArithmeticException? boy18nj BOOK: Beginning Cryptography with Java 5 July 12th, 2011 10:05 PM
Java Code - Wrox - Beginning JAVA - Ivor Horton ponguru Java Databases 3 May 18th, 2006 12:30 PM

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