Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Task 1: Write a method that uses a loop to find the greatest number in an integer array. The method only takes one parameter

Programming Task 1:

Write a method that uses a loop to find the greatest number in an integer array. The method only takes one parameter that is an integer array and returns the value of the greatest element of it. Additionally, you are also required to provide a main method in which the program asks the user to first input an integer n which denotes the number of elements in the array, and then the n numbers in the array. Type checking is required, the program should call the method after nvalid numbers are given.

Programming Task 2:

Write a recursive version for the method in Task 1. You may provide another Java file for this task.

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

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

Students also viewed these Databases questions