Page 510 - C++
P. 510
Telephone Billing System
A project to store record of Residents, their Telephone consumption and to generate Bills
struct Date
{
int dd,mm,yy;
};
struct Plan
{
int Plan_code;
int free_calls;
char Internet;
float Call_charges,Internet_charges,Rent_ph,Rent_internet,others;
};
class Resident
{
int R_code;
char Name[30],FatherName[20],Address[30],Phone[10],Mobile[15], pincode[8];
int free_calls;
float Arrear;
Plan P;
public:
void RGetdata();
void RDisplaydate();
int Return_Rcode()
{
Return R_code;
}
Char *Return_name() { return Name; }
int Return_Arrear ( )
{
return Arrear;
}
};
Class Monthly_cons
{
int R_code;
int call_consumed;
Date Bill_dt,Due_dt,payment_dt;
char paid;
float Bill_amt,Fin_amt;
public:
void MGetdata();
void Mdisplaydata();
int Return_Ward_no(){return R_code;}
int Return_Ch(Date pd)
{
if (pd,dd<=Due_dt.dd && pd.mm == Due_dt && pd.yy==Due+dt.yy.)
{