Færdiggjort

need help coding

i want to write a java code Write a program that does the following

Display the following menu

1. Calculate sum & average of a set of numbers

2. Find the max and min of a set of numbers

Make a selection [enter 1 or 2]:

Only valid selection is 1 or 2, anything else you keep looping and displaying the menu.

If 1 selected, then have the program call method sumANDaverageandCount todo the following:

a) Ask user to enter numbers (positive or negative) and stop on X

b) Read numbers and calculate sum & average

c) print the sum and average

If 2 selected, then have the program call method minANDmax to do the following:

a) Ask user to enter numbers (positive or negative) and stop on X

b) Read numbers and calculate max & min

c) print the max and min

Anything else selected that is not 1 or 2 then the program loops and display the choices 1 & 2 and waits to read the user input.

After finishing the task of part 1 or part2 the program prints Goodbye and program ends.

You must use the following template for your program.

public class Loops

{

public static void minANDmax() {

/*

*your code goes to here to read a set of integeres from the keyboard

* and x to stop reading. The method then determines the minimum number

* read and the maximum number read then print to the screen both the

* max & min

*

*/

}

public static void sumANDaverageandCount() {

/*

*your code goes to here to read a set of integers from the keyboard

* and x to stop reading. The method then calculates the sum, the count,

* and the average and prints both numbers to the scree

*

*/

}

public static void main(String[] args) {

/**

* your code goes her to display the menue for choice 1 or 2 then read the

* data. Stay in loop if number entered is not 1 nor 2. If it

* is either 1 or 2, then exit loop and check if 2 is entered then call

* method minANDmax else if 1 is entered then call method

* sumANDaverageandCount. Finally print goodbye to screen.

*/

}

}

Here is a sample run with selection 1

1. Calculate sum & average of a set of numbers

2. Find the max and min of a set of numbers

Make a selection [enter 1 or 2]:

1

Enter + or - numbers and x to stop

1 2 3 4 5 6 x

Sum= 21

Count= 6

Average= 3

Goodbye

Here is a sample run with selection 2

1. Calculate sum & average of a set of numbers

2. Find the max and min of a set of numbers

Make a selection [enter 1 or 2]:

2

Enter + or - numbers and x to stop

1 2 5 3 7 0 4 x

Max = 7

Min = 0

Goodbye

Here is a sample run with wrong menu choice 0 and 9 and finally correct menu choice 2

1. Calculate sum & average of a set of numbers

2. Find the max and min of a set of numbers

Make a selection [enter 1 or 2]:

0

1. Calculate sum & average of a set of numbers

2. Find the max and min of a set of numbers

Make a selection [enter 1 or 2]:

9

1. Calculate sum & average of a set of numbers

2. Find the max and min of a set of numbers

Make a selection [enter 1 or 2]:

2

Enter + or - numbers and x to stop

1 2 5 3 7 0 4 x

Max = 7

Min = 0

Goodbye

-

Evner: Java, C programmering, C++ Programmering, Software Arkitektur, JavaScript

Se mere: coding help websites, free coding help, ask a coder, how to get help with programming, coding help website, coding help, python, coding help reddit, coding help discord, mp3 files need help transcribing, need help adding google adsense site, freelance need help wsdl file, open source projects need help, need help text website, help coding database users login, php mysql coding design template, need help building resume, need help fixing cre loaded, coldfusion website need help, need help finishing work, need help design hair salon

Om arbejdsgiveren:
( 0 bedømmelser ) Kuwait City, Kuwait

Projekt ID: #27307931

Tildelt til:

dkachchhi9

I am a C/C++, Python, Java expert with 2 years of competitive programming experience with knowledge of Data structures and algorithms and I can do your work as soon as possible. Can we discuss more on this project on c Flere

$30 USD på 1 dag
(14 bedømmelser)
3.5

6 freelancere byder i gennemsnit $23 timen for dette job

sheikhnazeer3

Hello, My name is Nazeer and I'm a full-time freelancer from Pakistan. I read your job offer regarding the java task and I'm ready to start right away. I am also flexible with whatever budget you have. Accuracy and cl Flere

$15 USD på 1 dag
(2 bedømmelser)
1.1
hmirza39

Hello, Sure I'll provide programming code on java according your guidelines. If you gave us your project you will get better service from us. Thanks & Regards Hamza

$20 USD in 4 dage
(0 bedømmelser)
0.0
jaygohil97

Hi there, I read your description and ready to take your project. I have better skill in Web developing. I recently completed my diploma in information technology. I have 1-year experience in silver wings technology. Flere

$20 USD in 7 dage
(0 bedømmelser)
0.0
mahishapatel

I am currently pursuing Computer Engineering. I've worked with various programming languages(Python, Core Java, C++, C) and can complete this within a day.

$20 USD på 1 dag
(0 bedømmelser)
0.0
bilalzafar346

Greetings ! Just saw your project post about Java programming. I am Bilal, being a Computer engineer, I believe myself to be capable of doing wonders in MANY fields. I have read the complete job description and I can Flere

$30 USD in 7 dage
(0 bedømmelser)
0.0