Question: In JAVA please program Problem 4-Write methods Submit a program called: directMethods.java 1. Create a method called time() that takes an integer (total number of

In JAVA please program
 In JAVA please program Problem 4-Write methods Submit a program called:

Problem 4-Write methods Submit a program called: directMethods.java 1. Create a method called time() that takes an integer (total number of seconds) and outputs to screen a clock in 24 hour format (hours, minutes and seconds). The return value should be the number of hours. If the number of seconds entered is greater than the number of seconds in a day, the method should return-1. 2. Create a method called prime() that checks if a number is prime or not. It should return true if it is prime and false otherwise. 3. Create a method called allFactors() that prints out all the factors of a given number. The return value should be the number of factors 4. Create a main method using these methods. Your main method should only contair three lines: System.out.println(time(18000)); System.out.println(prime(13)); System.out.println(allFactors(100))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres how you can implement the directMethodsjava progra... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!