Week 01 Lab 00 Revision Method
Week 01 Lab 00 Revision Method
Method Revision
For each of the method below, state the following: name, argument(s), return type and what it does
Name: CalculateCommission
Argument(s): No argument
What it does: Calculates commissions based on user input and displays them for the number of sales
entered.
Name: CalculateTax
Argument(s): double representing the cost price and two-letter province code
What it does: It calculates and displays the selling price of the item based on the province. If the
province is Ontario a tax of 13% is added to the price, if the province is Quebec a tax of 17% is added to
the cost price. There is no tax for the rest of the provinces and territories
public static double Heron(double a, double b, double c)
{
double s = (a + b + c) / 2; # 3:
return Math.Sqrt(s * (s - a) * (s - b) * (s - c));
}
Name: Heron
Name: CalculateLastDigitFrequency
Name: DisplayIntArray
What it does: This method displays all the elements of the argument on a single line.