# Write a program to calculate the property tax ```After answering this question you will be able to:
b) Distinguish between instance variables and class variables
c)
Distinguish between methods and class methods
d) Know how to call class methods and how to call instance methods
e)
Format numbers to reflect dollar currency
Write a program to calculate the property tax. Property tax is calculated on 92% of the assessed value of the
property. For example, if the assessed value is \$100,000.00, the property tax is on \$92,000.00. Assume that
the property tax rate is \$1.05 for each \$100.00 of the assessed value. Your program should produce an
output similar to the following.
The following test class generates the following output. Write the class PropertyTax.
import java.text.NumberFormat;
class TestPropertytax
{
public static void main(String[] arg)
{
NumberFormat nf = NumberFormat.getCurrencyInstance();
PropertyTax p1 = new PropertyTax(100000, 1.05);
p1.calculate();
print(p1, nf);
System.out.println(&quot;----------------------------------&quot;);
PropertyTax p2 = new PropertyTax(150000, 1.05);
p2.calculate();
print(p2, nf);
System.out.println(&quot;----------------------------------&quot;);
System.out.println(&quot;Total tax revenue &quot; + nf.format(PropertyTax.totalTax()));
System.out.println(&quot;--------- End of report ----------&quot;);
}
static void print(PropertyTax p, NumberFormat nf)
{
System.out.println(&quot;Assessed value &quot; + nf.format(p.getAssessedValue()));
System.out.println(&quot;Taxable amount &quot; + nf.format(p.getTaxableAmount()));
System.out.println(&quot;Tax rate for each \$100.00 is &quot; + nf.format(p.getTaxRate()));
System.out.println(&quot;Property tax is &quot; + nf.format(p.getTax()));
}
}
```