Create a C# Using a GUI, Define a Method named CalcPay that takes as argument the hours and rate and return the gross pay, the method signature is as follow: public static double CalcPay(double hours, double rate) Take into consideration that an employee has to be paid 1.5 the rate for the hours more than 40.
C# Function which returns the final pay for the employee:
public static double CalcPay(double hours, double rate){
double pay;
if(hours<=40){
pay=hours*rate;
}
else
{
pay=((40*rate)+((hours-40)(1.5*rate)));
}
return pay;
}
if you like the answer please provide a thumbs up.
Create a C# Using a GUI, Define a Method named CalcPay that takes as argument the...
Create a public static method named valueG that takes an ArrayList of type Double and returns a double. This method returns the maximum result ( do not return the original value) of taking the sine of each value from the input
*Java* Create a public static method named maxRes that takes an ArrayList of type Double and returns a double. This method returns the maximum result (do not return the original value) of taking the tangent of each value from the input
Create a Java file named Ch6Asg.java that contains a public class named Ch6Asg containing a main() method. Within the same file, create another class named Employee, and do not declare it public. Create a field for each of the following pieces of information: employee name, employee number, hourly pay rate, and overtime rate. Create accessor and mutator methods for each field. The mutator method for the hourly pay rate should require the value to be greater than zero. If it...
Programming 5_1: Create a Java class named <YourName>5_1 In this class create a main method, but for now leave it empty. Then write a Java method getAverage which takes an array of integers as it’s argument. The method calculate the average of all the elements in the array, and returns that average. The method should work for an array of integers of any length greater than or equal to one. The method signature is shown below: public static double getAverage(...
Define an interface named Shape with a single method named area that calculates the area of the geometric shape: public double area(); Next, define a class named Circle that implements Shape. The Circle class should have an instance variable for the radius, a constructor that sets the radius, an accessor and a mutator method for the radius, and an implementation of the area method. Define another class named Rectangle that implements Shape. The Rectangle class should have instance variables...
How to Define a function named calculatePI that takes a positive integer n as its argument and calculates π using the formula: (Assume n is odd, which is the precondition of the function. And, this function should return double type value.) π = 4*(1 – 1/3 + 1/5 – 1/7 + 1/9 – 1/11 + ... 1/n)
Create a payroll program named CalcPay that allows the user to enter two double valuesand a string namely hours worked, hourly rate and name. After the user enters the rate, hours,and name the program should calculate the gross pay. Compute federal withholding tax which is subtracted from gross based on the following table: Hints: (100pts) Use methods as deemed appropriate. 0 to 99.99 6% 100.00 to 299.99 12% 300.00 to 599.99 18% 600.00 and up 21%. Display the output. The...
Create a payroll program named CalcPay that allows the user to enter two double valuesand a string namely hours worked, hourly rate and name. After the user enters the rate, hours,and name the program should calculate the gross pay. Compute federal withholding tax which is subtracted from gross based on the following table: Hints: (100pts) Use methods as deemed appropriate. 0 to 99.99 6% 100.00 to 299.99 12% 300.00 to 599.99 18% 600.00 and up 21%. Display the output. The...
Write a static method named middleValue that takes three int arguments, and returns an int. When given three different argument values, the method should return the value that is numerically between the other two values. When given three values where two or more argument values are the same, then the function should return that value. Examples: middleValue(1, 2, 3) will return 2 middleValue(5, 2, 7) will return 5 middleValue(8, 4, 6) will return 6 middleValue(1, 2, 1) will return 1...
Create an applet payroll program named CalcPay that allows the user to enter two double valuesand a string namely hours worked, hourly rate and name. After the user enters the rate, hours,and name the program should calculate the gross pay by pressing CALCULATE button. Compute federal withholding tax which is subtracted from gross based on the following table: Hints: (100pts) Use methods as deemed appropriate. 0 to 99.99 6% 100.00 to 299.99 12% 300.00 to 599.99 18% 600.00 and up...