11/09/2014

BCS2233 OOP. LAB week 8 (9-13 Nov 2014)

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));
    }
}



No comments:

Cara download Installer windows 10 dalam format ISO

1. Jika anda bercadang untuk download windows 10 melalui website rasmi windows - pilihan untuk download dalam format ISO tidak di berikan.  ...