A. Write method headers for the following methods:
1. Computing a sales commission, given the sales amount and the commission rate.
2. Printing the calendar for a month, given the month and year.
3. Computing a square root.
4.Testing whether a number is even, and returning true if it is.
5.Printing a message a specified number of times.
6.Computing the monthly payment, given the loan amount, number of years, and annual interest rate.
7.Finding the corresponding uppercase letter, given a lowercase letter.
Selected Solution
A
1. public static double cal_comm(double sa, double comm)
2. public static void MYCalender(int year, int month)
public class demoMethod {
public static double cal_comm(double sa, double comm){
//1. Computing a sales commission, given the sales amount
//and the commission rate.
double bayaran;
bayaran = sa * (comm/100);
return bayaran;
}
public static void main(String[] args) {
double jum_jual=1000;
double kadar_komisyen=15;
System.out.println(cal_comm(jum_jual,kadar_komisyen));
}
}