The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 337 Weeks Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Hello
I need help with JAVA , I need to fix this code. This is what I have done so far.
Thank you
/**
*
* @author Home
*/
import java.util.Scanner;
public class Audiobooks {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
//Declare variables
double dBookPrice = 0.0;
String sCustName = "";
// Numbers of books purchased bu user
double dNumBooks = 0;
//Type of customer entered by user
double dTypeofCustomer = 0.0;
//Regular price entered by user
double dRegPrice = 0.0;
//Premium price entered by user
double dPremPrice = 0.0;
//Membership price
double dMemberPrice = 0.0;
//Total books purchsed by user
double dTotalBooks = 0.0;
//Sales tax entered by user
double dSalesTax = 0.0;
//Price after tax
double dAfterTax = 0.0;
//tax rate after calculations
final double TAX_RATE = 0.065;
Scanner input = new Scanner (System.in);
//Unsed to read input from console
//Prompt user for product
System.out.println("Please enter your name:");
sCustName = input.next();
//Read product from user
System.out.println("How many books did you purchase?");
dNumBooks = input.nextDouble();
// Prompt user for books purchase
System.out.println("What type of customer are you?(Enter 1 for Regular; 2 for Premium):");
dTypeofCustomer = input.nextInt();
//If statement to calculate total book given to the customer
if (dTypeofCustomer nNum1 < nNum2){
}
} //end main method
} //end class Audiobooks
----------- ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly