In the driver file (the regular java file that is separate from the above file) invoke each of these methods without any instantiations (creating objects) and make sure the results are printed.

computer science

Description

Create a math class that has 3 methods with functions as follows:

  • 1st method: Calculates the factorial of the input.
  • 2nd method: Decides if an integer number is divisible by 3 or not.
  • 3rd method: calculates the summation of 3 inputs.

In the driver file (the regular java file that is separate from the above file) invoke each of these methods without any instantiations (creating objects) and make sure the results are printed. BTW, there is no need for Scanner and just enter the inputs directly.

 

Consider the following points in accomplishing the task:

  • Submit both of your finalized java files.
  • Put the snapshot of your console after running your code. (10 pts).
  • Write a short report on how your code works, for example “It works perfectly” or “It cannot do this part of the challenge that wants us …”. (10 pts)

 


Related Questions in computer science category