Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > explaination and steps

Reply
Thread Tools

explaination and steps

 
 
ells912@gmail.com
Guest
Posts: n/a
 
      04-16-2008
a. How to write a program that asks the user to enter any number of
integers that are in the range of 0 to 30 inclusive and count how many
occurrences of each number are entered. Use a suitable sentinel to
signal the end of input. Print out only the numbers (with the number
of occurrences) that were entered one or more times.

b. In a gymnastics or diving competition, each contestant's score is
calculated by dropping the lowest and highest scores and then adding
the remaining scores. Write a program that allows the user to enter
eight judges' scores and then outputs the point received by the
contestant. A judge awards point between 1 and 10, with 1 being the
lowest and 10 being the highest. For example, if the scores are:
9.2, 9.3, 9.0, 9.9, 9.5, 9.5, 9.6 and 9.8
the contestant receives a total of 56.9 points.

For both questions need to use array. Since i am not really good with
this topic, can somebody explain what is all about?? I am really
stuck !! thanks.
 
Reply With Quote
 
 
 
 
Jeff Higgins
Guest
Posts: n/a
 
      04-16-2008

ells912 wrote:
> a. How to write a program?
> b. Write a program!


<http://home.earthlink.net/~patricia_shanahan/beginner.html>
<http://mindprod.com/jgloss/gettingstarted.html>

> For both questions need to use array.


<http://xahlee.org/java-a-day/arrays.html>

> Since i am not really good with
> this topic, can somebody explain what is all about?? I am really
> stuck !! thanks.



 
Reply With Quote
 
 
 
 
RedGrittyBrick
Guest
Posts: n/a
 
      04-16-2008
Jeff Higgins wrote:
>
>> For both questions need to use array.

>
> <http://xahlee.org/java-a-day/arrays.html>


http://tinyurl.com/iatf

http://java.sun.com/docs/books/tutor...ts/arrays.html

--
RGB
 
Reply With Quote
 
Jeff Higgins
Guest
Posts: n/a
 
      04-16-2008

RedGrittyBrick wrote:
>
> http://tinyurl.com/iatf Sorry, couldn't help it.
>
> http://java.sun.com/docs/books/tutor...ts/arrays.html
>



 
Reply With Quote
 
Patricia Shanahan
Guest
Posts: n/a
 
      04-16-2008
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> a. How to write a program that asks the user to enter any number of
> integers that are in the range of 0 to 30 inclusive and count how many
> occurrences of each number are entered. Use a suitable sentinel to
> signal the end of input. Print out only the numbers (with the number
> of occurrences) that were entered one or more times.
>
> b. In a gymnastics or diving competition, each contestant's score is
> calculated by dropping the lowest and highest scores and then adding
> the remaining scores. Write a program that allows the user to enter
> eight judges' scores and then outputs the point received by the
> contestant. A judge awards point between 1 and 10, with 1 being the
> lowest and 10 being the highest. For example, if the scores are:
> 9.2, 9.3, 9.0, 9.9, 9.5, 9.5, 9.6 and 9.8
> the contestant receives a total of 56.9 points.
>
> For both questions need to use array. Since i am not really good with
> this topic, can somebody explain what is all about?? I am really
> stuck !! thanks.


These exercises combine use of arrays with processing user input. If you
are not already comfortable with at least one of those topics you should
split the issues.

To improve your array skills, do each exercise with the input data
already in an array.

To learn user input, practice reading single numbers, then groups of
numbers, and e.g. printing the square of each input.

If there were earlier exercises for either of these topics, go back over
them and make sure you really understand them. Programming is a
cummulative subject - if you do not understand an earlier topic you will
have a lot of trouble learning later ones.

Patricia
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      04-16-2008
On Wed, 16 Apr 2008 06:14:23 -0700 (PDT), (E-Mail Removed) wrote,
quoted or indirectly quoted someone who said :

>For both questions need to use array. Since i am not really good with
>this topic, can somebody explain what is all about?? I am really
>stuck !! thanks.


see http://mindprod.com/jgloss/array.html
see http://mindprod.com/jgloss/homework.html
see http://mindprod.com/jgloss/newsgroups.html

--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code Explaination: Spelling correction code Drew Python 4 04-12-2007 08:17 PM
in depth explaination... josh C++ 8 11-28-2006 08:45 PM
explaination need for if such a qualifier appears at the outermost level of the parameter type, it is simply ignored: baumann@pan C++ 0 05-19-2005 07:08 AM
Ports explaination. Ed Computer Support 3 12-03-2004 07:20 PM
Explaination please - variable placement. estafford ASP .Net 3 08-22-2003 06:53 PM



Advertisments