Question 7
Write a Java program to store three integers as instance varia
(15)
the following functions:
Integers as instance variables and create
a. int findmax()- to find and return the maximum of
nd and return the maximum of the three numbers, using
conditional operators.
b. int findmin ()- to find and return the minimum of the three numbers, using
conditional operators:
Question 8
(15)
Define a class Mortgage described as below:
Data Members: int loan,
double time, rate, interest, repay
Member methods:
a. Mortagage (int p, double r, double t) - constructor to initialize member -
loan to p, rate to r, time to t, and rest to null.
b. Estimate() - to calculate the Interest using formula:
interest = (loan*rate*time)/100.And also to calculate Amount to Repay using th
formula repay= loan +interest
c. Display () - to display all members data.
Write a main () method to create and object of the class and call the above
member methods.
plz answer as quick as possible for 15 points
Answers
Answered by
0
Explanation:
only 8 points are written here
Similar questions
English,
5 months ago
Hindi,
5 months ago
Social Sciences,
5 months ago
India Languages,
10 months ago
Math,
10 months ago
Accountancy,
1 year ago