Page 174 - C++
P. 174
Charges is more than 11000 then as 1.02 * Days * Charges
Public Members
Getinfo( ) // A function to enter the content Rno,
// Name, Charges and Days
Dispinfo( ) // A function to display Rno, Name,
// Charges, Days and Amount (Amount to
// be displayed by calling function
// COMPUTE( ) )
Ans.
class RESORT
{
int Rno;
char Name[20];
float Charges;
int Days;
float COMPUTE( );
public:
void Getinfo( );
void Dispinfo( );
};
void RESORT:: Getinfo( )
{
cin>>Rno;
gets(Name);
cin>>Charges;
cin>>Days;
}
void RESORT:: Dispinfo( )
{
cout<<Rno<<“ “<<Name<<“ “<<Charges<<“ “<<Days<<COMPUTE( )<<endl;