|
|
|
|
|
|
BMW Garage | BMW Meets | Register | Today's Posts | Search |
|
BMW 3-Series (E90 E92) Forum
>
Official SoCal Chat Thread (#5)
|
|
01-31-2009, 10:24 PM | #53550 |
Colonel
69
Rep 2,385
Posts |
package lkuprojectone;
import java.util.Scanner; public class ProjectOne { public static void main(String[] args) { //Welcome Message System.out.println("Welcome to the MPFC Calculator"); System.out.println(); //Enter Information Scanner sc = new Scanner(System.in); System.out.println("Please enter your first name:"); String firstName = sc.next(); System.out.println("Please enter your last name:"); String lastName = sc.next(); System.out.println("Please enter your phone number:"); String phoneNumber = sc.next(); System.out.println("Please enter your vehicle type:"); String vehicleType = sc.next(); System.out.println("Please enter your vehicle team:"); String vehicleTeam = sc.next(); System.out.println("Please enter starting mileage:"); double startingMileage = sc.nextDouble(); System.out.println("Please enter ending mileage:"); double endingMileage = sc.nextDouble(); System.out.println("Please enter the starting fuel cell units:"); double startingFuel = sc.nextDouble(); System.out.println("Please enter the ending fuel cell units:"); double endingFuel = sc.nextDouble(); double milesTravelled = endingMileage - startingMileage; double usedFuel = startingFuel - endingFuel; double fuelCost = 22.00; double milesPerFuel = milesTravelled / usedFuel; double tripCost = milesTravelled * fuelCost; String fuelRating; if (milesPerFuel >= 300) fuelRating = "Amazing!!"; else if (milesPerFuel >= 200) fuelRating = "Economical"; else if (milesPerFuel < 200); fuelRating = "Fuel Cell Guzzler"; System.out.println("Customer Name:" + firstName + " " + lastName); System.out.println("Customer Phone:" + phoneNumber); System.out.println("Vehicle Type:" + vehicleType); System.out.println("Vehicle Team:" + vehicleTeam); System.out.println("Starting Odometer Reading:" + startingMileage); System.out.println("Ending Odometer Reading:" + endingMileage); System.out.println("Number of Miles Traveled:" + milesTravelled); System.out.println("Fuel Cells Used:" + usedFuel); System.out.println("Cost of Fuel:" + fuelCost); System.out.println("Mile Per Fuel Cell Usage:" + milesPerFuel); System.out.println("Cost of Trip:" + tripCost); System.out.println("Car MPFC Rating:" + fuelRating); } } |
Appreciate
0
|
01-31-2009, 10:29 PM | #53553 |
Lieutenant General
3072
Rep 13,776
Posts |
noice
__________________
~loud noises~
|
Appreciate
0
|
01-31-2009, 10:30 PM | #53554 | |
¡Barça!
168
Rep 12,042
Posts
Drives: Rainbow Sandals
Join Date: May 2008
Location: Ohio
|
Quote:
__________________
Tate's chicken sucks!
|
|
Appreciate
0
|
01-31-2009, 10:36 PM | #53555 |
Supreme Allied Commander
2016
Rep 61,781
Posts
Drives: A BBS WHORE
Join Date: Jul 2007
Location: .
|
__________________
|
Appreciate
0
|
01-31-2009, 10:36 PM | #53556 |
Colonel
69
Rep 2,385
Posts |
|
Appreciate
0
|
01-31-2009, 10:36 PM | #53557 |
Supreme Allied Commander
2016
Rep 61,781
Posts
Drives: A BBS WHORE
Join Date: Jul 2007
Location: .
|
i eventually need some more Bridgestones...
__________________
|
Appreciate
0
|
01-31-2009, 10:38 PM | #53558 |
Supreme Allied Commander
2016
Rep 61,781
Posts
Drives: A BBS WHORE
Join Date: Jul 2007
Location: .
|
i hate having a cold...
__________________
|
Appreciate
0
|
01-31-2009, 10:41 PM | #53559 |
¡Barça!
168
Rep 12,042
Posts
Drives: Rainbow Sandals
Join Date: May 2008
Location: Ohio
|
__________________
Tate's chicken sucks!
|
Appreciate
0
|
01-31-2009, 10:55 PM | #53560 |
Volk Whore
233
Rep 18,832
Posts
Drives: nothing
Join Date: Apr 2007
Location: Home
|
you trust a guy that got a c-?
|
Appreciate
0
|
01-31-2009, 10:57 PM | #53561 |
¡Barça!
168
Rep 12,042
Posts
Drives: Rainbow Sandals
Join Date: May 2008
Location: Ohio
|
hell, America did for the past 8 years...
__________________
Tate's chicken sucks!
|
Appreciate
0
|
01-31-2009, 11:01 PM | #53563 |
The Law.
311
Rep 14,282
Posts |
bastard Leon. stop eating fatass and come back!
i have a bug in my coding and he goes "i know how to fix it, ok brb, i go eat". come back and troubleshoot it for me damit, im almost done! |
Appreciate
0
|
01-31-2009, 11:25 PM | #53564 |
The Law.
311
Rep 14,282
Posts |
Donedonedonedonedonedonedonedonedonedonedonedonedo nedonedonedonedonedonedonedonedonedonedonedonedone donedonedonedonedonedonedonedonedonedonedonedonedo nedonedonedonedonedonedonedonedonedonedonedonedone donedonedonedonedonedonedonedonedonedonedonedonedo nedonedonedonedonedonedonedonedonedonedonedonedone donedonedonedonedonedonedonedonedonedonedonedonedo nedonedonedonedonedonedonedonedonedonedonedonedone donedonedonedonedonedonedonedonedonedonedonedonedo nedonedonedonedonedonedonedonedonedonedonedonedone donedonedonedonedonedonedonedonedonedone
|
Appreciate
0
|
01-31-2009, 11:51 PM | #53566 | |
Custom Powder Coater
149
Rep 2,784
Posts |
Quote:
__________________
|
|
Appreciate
0
|
02-01-2009, 12:08 AM | #53567 |
Supreme Allied Commander
2016
Rep 61,781
Posts
Drives: A BBS WHORE
Join Date: Jul 2007
Location: .
|
oh snap....is law going to drop a smilie bomb???
__________________
|
Appreciate
0
|
02-01-2009, 03:11 AM | #53568 |
General
678
Rep 26,876
Posts
Drives: 2-325 330 2-335 2-Z4 2-135 X5d
Join Date: Mar 2007
Location: Huntington Beach, CA
|
|
Appreciate
0
|
02-01-2009, 05:25 AM | #53569 | |
General
392
Rep 21,745
Posts
Drives: E92 335i TiAg/E46 323i TiAg
Join Date: Mar 2007
Location: CA
|
Quote:
You saw me huh??? I was wondering if you were around there today. EVERY time I drive down there, I wonder if you're around... Where were you?
__________________
07 E92 335i | TiAg | Step | Padl | Cmft | Alum Trm | PDC | Nav | Assist | Sat | Lthr | Prem | Sprt | Rear Splr | RDSport Quads | iPod | V1 | LT Refl | VS Clear Bra | OEM Lip | KWV2 | Mtec Sides | BBS LM-R
00 E46 323i | TiAg | 5sp | Sport | Roof | RDSport Cams | RDSport tune | RDSport Shift | Volk LE37 | M3 spoiler | PSS9 | SuperSprint | Brembo |
|
Appreciate
0
|
02-01-2009, 05:26 AM | #53570 |
General
392
Rep 21,745
Posts
Drives: E92 335i TiAg/E46 323i TiAg
Join Date: Mar 2007
Location: CA
|
BTW, Vicky/Law...
My wife's a Java guru... She writes code that protects our national security.
__________________
07 E92 335i | TiAg | Step | Padl | Cmft | Alum Trm | PDC | Nav | Assist | Sat | Lthr | Prem | Sprt | Rear Splr | RDSport Quads | iPod | V1 | LT Refl | VS Clear Bra | OEM Lip | KWV2 | Mtec Sides | BBS LM-R
00 E46 323i | TiAg | 5sp | Sport | Roof | RDSport Cams | RDSport tune | RDSport Shift | Volk LE37 | M3 spoiler | PSS9 | SuperSprint | Brembo |
Appreciate
0
|
Bookmarks |
|
|