Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

1 - Create a class called NumberAnalyzer and implement the following methods in the class. a) oddOrEven : This method will take an integer as

1 - Create a class called NumberAnalyzer and implement the following methods in the class. a) oddOrEven : This method will take an integer as an argument and will return Odd or Even as a String depending on the number being odd or even. b) isItPrime : This method will take an integer as an argument and will return true or false as boolean depending on the number being a prime number or not. c) isItPerfect : This method will take an integer as an argument and will return true or false as boolean depending on the number being a perfect number or not. ( Look at the previous assignment for the definition of perfect numbers.) d ) fibonacci : This method will take an integer and return the Nth number in the fibonacci sequence as an integer. - The Fibonacci sequence : 1, 1, 2, 3, 5, 8, 13, 21, 34 starting with 1, 1 each number in the sequence is found by adding up the two numbers before it. So, the 1st fibonacci number is 1, the 2nd fibonacci number is 1 the 3rd fibonacci number is 2 . . . the 6th fibonacci number is 8 e)isNthFibonacciM: This method takes two integer arguments N and M then checks if the Nh Fibonacci number is M and returns true or false as boolean accordingly. (Hint: You can use the previous method.) N: 1 , M: 1 true N: 2 , M: 1 true N: 6 , M: 8 true N: 5 , M: 7 false N: 6 , M: 25 false 2- create the run method and do the following in it using the previous methods ask for the number N in an infinite loop Take the question number from the user and depending on the question number do the following. 1. Print Odd if the number is odd and Even if the number is even. 2. Print Yes if the number is prime and No if it is not 3. Print Yes if the number is perfect and No if it is not 4. Print the Nh Fibonacci number. 5. Ask the user for the number M and print Yes if the Nth fibonacci number is M, No otherwise. 6. 6 - quit

I want it in java language

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_2

Step: 3

blur-text-image_3

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students explore these related Databases questions