Details of this Paper

CIS 355 Homework 2




Question;CIS 355 Homework 2;Deadline;is May 20th;Name;Grade;Question;1: (10 points);Write a method to change the temperature;fromCelsius to Fahrenheit. The signature of;the method is given as below.;static double celsiusToFahrenheit(double;C);//;the formula is F = (9/5)*C+32;Question;2: (10 points);Write a method to calculate the salary;of the employee. If the work hours are less than or equal to 40 hours, the;salary = hours * rate. However, if the hours are over 40 hours, the extra hours;will be paid by 1.5* rate. The signature;of the method is given as below.;static double getSalary(double hours;double rate);Question;3: (10 points);Given an int array, write a method to count;the number of even numbers in the array.;static int numOfEvenNumber(int[] arr);//your implemention;Question;4: (10 points);4.1 What is the difference between;static fields and ordinary fields (i.e., the fields without static)?;4.2 What is the difference between;static methods and ordinary methods (i.e., the methods without static)?;Question;5: (10 points);What is constructor? What is the;function of the constructor?


Paper#36615 | Written in 18-Jul-2015

Price : $21