I have a class project where we must create a program that takes 5 grades of a student that the user inputs and stores them into an array and then gets the average of the 5 grades for example

Grades = 92 89 99 78 96

And then stores those numbers into an array and calculates the average and spits the average back out into a j-textfield

Any help is greatly appreciated thank you

hi Mas49er,
Could you show some of your code,
without knowing how you tried we can't answer your question

Well you'll need something to get the input from the user, and than to separate that input in parts that will be stored in the array. Say, if you need to insert grades, I'll recomand you a class in which you'll get the whole stream inserted by the user, as

eg.
<<Insert grades (separated by space):
>>1 2 3 4 5 6 7 8

and than to split that stream with the delimitter being the space " " character/string and than to convert them to int and insert them in the array.

This is very simple to achieve however, you need to show some effort ok?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.