Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following Numbers class will be used to analyze and retrieve sets of numbers public class Numbers @param num is a positive non-decimal value *@return

image text in transcribedimage text in transcribedimage text in transcribed

The following Numbers class will be used to analyze and retrieve sets of numbers public class Numbers @param num is a positive non-decimal value *@return false if the sum of digit divisors of num is odd eA public static boolean issillylint value) Precondition i num iait divisors of num is odd @return true if the sum of the digit divisors of num is even * to be implemented in part(a) *@param count is a positive non-decimal value *@return an array containing count Silly numbers eA public static intltemeSiliNumbers(it count) * to be implemented in part(b) // There may be variables./ fields, constructors, and methods that are not shown. A. Write the Numbers method issilly(), as started below. issilly ) will receive an integer and determine if that integer is Silly or not Silly. A Silly number is any number that has a digit divisor sum that is even. The sum must be greater than zero. The call isSilly (12) would return false as 12 has a digit divisor sum of 3 -[1,2] which is odd. The call issiily (15) would return true as 15 has a digit divisor sum of 6- [1,5] which is even. The call isSilly (26) would return true as 26 has a digit divisor sum of 2 12] which is even The call isSillx (8) would return true as 8 has a digit divisor sum of 8 [8] which is even. The call iSily (1234) would return false as 1234 has a digit divisor sum of 3 -[1,2] which is WA /** @param num is a positive non-decimal value *@return false if the sum of digit divisors of num is odd eA @return true if the sum of the digit divisors of num is even public static boolean issillylint value) B. write the Numbers method get some siiyNumbers() , as started below. get somesillyNumbers ) will receive a count of how many Silly numbers to return. The call getSomeSillyNumbers (3) would return [2, 4,6 The call getSomeSillyNumbexs (15) would return [2, 4, 6, 8, 11, 15, 20, 22, 24, 26, 28, 32, 33, 40, 42 You must call the method from part a, assuming the method works as specified regardless of what you wrote. *aparam count is a positive non-decimal value *@return an array containing count Silly numbers eA public static intltemeSiliNumbers(it count) The following Numbers class will be used to analyze and retrieve sets of numbers public class Numbers @param num is a positive non-decimal value *@return false if the sum of digit divisors of num is odd eA public static boolean issillylint value) Precondition i num iait divisors of num is odd @return true if the sum of the digit divisors of num is even * to be implemented in part(a) *@param count is a positive non-decimal value *@return an array containing count Silly numbers eA public static intltemeSiliNumbers(it count) * to be implemented in part(b) // There may be variables./ fields, constructors, and methods that are not shown. A. Write the Numbers method issilly(), as started below. issilly ) will receive an integer and determine if that integer is Silly or not Silly. A Silly number is any number that has a digit divisor sum that is even. The sum must be greater than zero. The call isSilly (12) would return false as 12 has a digit divisor sum of 3 -[1,2] which is odd. The call issiily (15) would return true as 15 has a digit divisor sum of 6- [1,5] which is even. The call isSilly (26) would return true as 26 has a digit divisor sum of 2 12] which is even The call isSillx (8) would return true as 8 has a digit divisor sum of 8 [8] which is even. The call iSily (1234) would return false as 1234 has a digit divisor sum of 3 -[1,2] which is WA /** @param num is a positive non-decimal value *@return false if the sum of digit divisors of num is odd eA @return true if the sum of the digit divisors of num is even public static boolean issillylint value) B. write the Numbers method get some siiyNumbers() , as started below. get somesillyNumbers ) will receive a count of how many Silly numbers to return. The call getSomeSillyNumbers (3) would return [2, 4,6 The call getSomeSillyNumbexs (15) would return [2, 4, 6, 8, 11, 15, 20, 22, 24, 26, 28, 32, 33, 40, 42 You must call the method from part a, assuming the method works as specified regardless of what you wrote. *aparam count is a positive non-decimal value *@return an array containing count Silly numbers eA public static intltemeSiliNumbers(it count)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

Describe Generation

Answered: 1 week ago

Question

Identify five strategies to prevent workplace bullying.

Answered: 1 week ago