Make a new Java Project called Lab4. Then create a new class called MaxValue. In this class, implement a program that reads 5 numbers (doubles), stores them into an array, and then outputs the maximum value in the array. Example output: Enter the 1st number: 4 Enter the 2nd number: 3 Enter the 3rd number: 7 Enter the 4th number: 9 Enter the 5th number: 1 The maximum value is 9.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 22PE
icon
Related questions
Question
Use java.
Exercise 1 - Maximum Value
Make a new Java Project called Lab4. Then create a new class called MaxValue. In this class,
implement a program that reads 5 numbers (doubles), stores them into an array, and then
outputs the maximum value in the array.
Example output:
Enter the 1st number: 4
Enter the 2nd number:
Enter the 3rd number: 7
Enter the 4th number: 9
Enter the 5th number: 1
The maximum value is 9.
Transcribed Image Text:Exercise 1 - Maximum Value Make a new Java Project called Lab4. Then create a new class called MaxValue. In this class, implement a program that reads 5 numbers (doubles), stores them into an array, and then outputs the maximum value in the array. Example output: Enter the 1st number: 4 Enter the 2nd number: Enter the 3rd number: 7 Enter the 4th number: 9 Enter the 5th number: 1 The maximum value is 9.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning