Monday, February 25, 2013
Abstract Class Java
The slip discipline Moslem defined below represents a Muslim person and his monthly delivers for the year:
distinguish: Muslim
Attribute: denomination, age, saving[12](monthly saving for each month of a year)
a) draw the constructor for class Muslim and write the accessor for attribute name and age, and setter methods for all attributes.
b) write the description of getMin() method to come down the minimum centre in the saving array.
c) Write the definition of getTotSaving() method to return the total savings for the year.]
d) Write an solicit method called SalaryZakat which lead calculate and returns the amount of zakat that a Muslim person should pay. The calculation of Zakat is based on the total saving for the year. If the amount is greater than RM3502.35, then 2.5 % of the total saving is to be given away for zakat, otherwise no zakat is required to be paid.
e) Create and define completely a new class called ZakatPayer that will inherit Muslim class, a new selective information members for this class are FitrahRate and the Dependents. This class will have mutator and accessor methods for info members. This class will have a method which calculates and returns the amount of FitrahZakat to be paid. The calculation of FitrahZakat is based on the following formula
FitrahZakat = FitrahRate * Dependents
f) Write an application to:
i) Create 5 ZakatPayer objects and input all the info.
ii) guide and display total zakat (SalaryZakat + FitrahZakat) that should pay for each Zakat Payerobject, and find the highest salary between 5 ZakatPayers and display all the info of ZakatPayers that will pay the highest payment of zakat.
iii) Calculate the total Fitrah Zakat for 5 ZakatPayers.
|abstract class Employee |
|...If you want to get a full essay, order it on our website: Orderessay
If you want to get a full essay, wisit our page: write my essay .
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment