public class BillTest
{
public static void main (String[]arg)
{
Bill mum=new Bill(130,100); //object mum
Bill sister=new Bill(200,50); //object sister
Bill family=new Bill(0,0); // object family
family=family.calculateTotal(mum,sister);
System.out.println("Total bill:");
family.calculateBill();
}
}What method i should write the calculateTotal(mum,sister)?public class Bill
{
int airtime;
int totalSms;
int total;
public double callrate=0.25;
public double smsrate=0.05;
Bill(int a, int s)
{
airtime = a;
totalSms= s;
}
public int calculateTotal(mum, sister)
{
return total;
}
public double calculateBill()
{
return (airtime * callrate+ totalSms * smsrate);
}
}
calculate the total " airtime from mum and sister" and "totalSms from mum and sister" ...