Design a class named "HighConnect" having the following data members and member functions: Data Members: int data : stores the amount of data consumed monthly in GB. String consNo: stores the consumer number Member Functions: HighConnect( ) : non-parameterized constructor to initialize the data members to default values. HighConnect( int d, String cNo) : parameterized constructor to initialize data members with user defined values int getCharges( ) : returns the net payable amount for using Internet connection in a month as per the criteria given below: void display( ) : displays the Consumer Number, monthly data consumption and the Net Bill Amount. You need to define a main( ) function to invoke the functions of the above class.
Answers
Answered by
1
Answer:
Design a class named "HighConnect" having the following data members and member functions: Data Members: int data : stores the amount of data consumed monthly in GB. String consNo: stores the consumer number Member Functions: HighConnect( ) : non-parameterized constructor to initialize the data members to default values. HighConnect( int d, String cNo) : parameterized constructor to initialize data members with user defined values int getCharges( ) : returns the net payable amount for using Internet connection in a month as per the criteria given below: void display( ) : displays the Consumer Number, monthly data consumption and the Net Bill Amount. You need to define a main( ) function to invoke the functions of the above class.
Similar questions