· Overload the above average method such that if three



Download 13.5 Kb.
Date16.12.2020
Size13.5 Kb.
#54717
Create a base (-WPS Office
Create a base (-WPS Office, Create a base (-WPS Office

Create a base (parent ) class to store characteristics about a loan. Define sub (child ) classes of automobile loan and house loan. Include unique characteristics in the derived classes.Create a presentation class to test your design by displaying information about both types of loans.

Q.2


Write a method called average that accepts two integer parameters and returns their average as a floating point value.

· Overload the above average method such that if three

integers are provided as parameters, the method returns the average of all three.

· Overload the above average method to accept four integer parameters and return their average.

Q.2

Write a method called average that accepts two integer parameters and returns their average as a floating point value.



· Overload the above average method such that if three

integers are provided as parameters, the method returns the average of all three.



· Overload the above average method to accept four integer parameters and return their average.
Download 13.5 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page