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.
Share with your friends: |