Question: In Java A prune number is only divisible by 1 and itself, while composite numbers have three or more divisors When a number has a

 In Java A prune number is only divisible by 1 and
In Java

A prune number is only divisible by 1 and itself, while composite numbers have three or more divisors When a number has a lot of divisors, such as 12 or 360, we might want to identify them as haghly composite" Since larger numbers have more chances for divisors, we need a defination that acknowledges this, so we use the following A pontive integer X is highly composite if every positive integer lower than it has fewer divisors than X. You can think of this as walking the number une from 1 upwards, and each time you reach a new high score of number of divisors, you've identified a highly composite number This chart may help value of n 1 2 3 4 5 6 7 8 9 10 11 12 13 ... number of divisors 1 2 2 3 2 4 2 4 3 4 2 62 most seen so far 1 2 2 3 3 4 4 4 4 4 6 6 who had that #divs first? 1 2 2 4 4 6 6 6 6 6 6 12 12 hughly composite? Y YN Y N Y N N N N N YN Create the following two methods. public static int nundivisors(int num) It returns how many divisors num has or -1 when numas not a positive integer public static boolean highly composite(int nun) Given a positive integer nun (no need for validation), it returns true or false accordingly. Thas method must call nundivisons, you will lose points if you repeat functionality that was already built for mudivisor's

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!