Q:
A local company has the following monthly charges for snowclearing services:
$250 for 0-5 visits
$250 + $55 for each visit over 55
13% tax is to be charged in each case
if previous balance is not zero, intrest of 4% of that balance is to be charged.
theres also some other stuff i need to include, but this sums up the problem im having:
public class Snow
{
private int visit;
private String name;
private String month;
private String address;
private double pBalance;
private String mop;
private double total;
private double flatRate;
public Snow(String mName, String cName, String cAddress, int numVisit, double preBalance, String methodOP)
{
month = mName;
name = cName;
address = cAddress;
visit = numVisit;
pBalance = preBalance;
mop = methodOP;
flatRate = 282.5;
}
public double getTotal()
{
while ((visit >= 0) && (visit <= 5))
{
total = flatRate;
}
while (visit>5)
{
//wtf goes here....
}
while (pBalance > 0);
{
pBalance = pBalance * .04 + pBalance + total;
}
return total;
}
}
When visit is greater then 5, i need to charge &250 + $55 per visit & im having trouble initializing that in java.
if visit > 5; total = 250 + 55 per visit - would be the pseudo code?