Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Beginniner Algorithm Question (http://www.velocityreviews.com/forums/t622744-beginniner-algorithm-question.html)

 Ray Leon 06-28-2008 02:02 PM

Beginniner Algorithm Question

Dear Sirs or Madam:

I have completed what I believe to be a correct answer to an algorithm. The
orignal question was posed as an incomplete algorithm, whereas I was to
complete it and move on to a flowchart of the same. I appreciate any help.
The link to the picture is here:

http://www.popeyeray.com/algorithm.htm

Thank You,

Ray Leon
popeyeray@qwest.net

 Patricia Shanahan 06-28-2008 03:39 PM

Re: Beginniner Algorithm Question

Ray Leon wrote:
> Dear Sirs or Madam:
>
> I have completed what I believe to be a correct answer to an algorithm. The
> orignal question was posed as an incomplete algorithm, whereas I was to
> complete it and move on to a flowchart of the same. I appreciate any help.
> The link to the picture is here:
>
> http://www.popeyeray.com/algorithm.htm
>
> Thank You,
>
> Ray Leon
> popeyeray@qwest.net
>
>

It appears from the instructor's note quoted in the web page that you
have an instructor who has given carefully chosen help: "Without giving
you too much, can you see where I'm going with this?". If you have
doubts about your algorithm, you should discuss them with the instructor.

For future reference, it is very, very important to indicate what the
code is supposed to do. Also, there are a lot of ways of organizing and
indenting if-then-else structures. It doesn't matter much which you
choose, but you should not mix them in any one piece of code.

Patricia

 popeyerayaz 06-28-2008 05:56 PM

Re: Beginniner Algorithm Question

On Jun 28, 8:39*am, Patricia Shanahan <p...@acm.org> wrote:
> Ray Leon wrote:
> > Dear Sirs or Madam:

>
> > I have completed what I believe to be a correct answer to an algorithm. The
> > orignal question was posed as an incomplete algorithm, whereas I was to
> > complete it and move on to a flowchart of the same. I appreciate any help.
> > The link to the picture is here:

>
> >http://www.popeyeray.com/algorithm.htm

>
> > Thank You,

>
> > Ray Leon
> > popeye...@qwest.net

>
> It appears from the instructor's note quoted in the web page that you
> have an instructor who has given carefully chosen help: "Without giving
> you too much, can you see where I'm going with this?". If you have
> doubts about your algorithm, you should discuss them with the instructor.
>
> For future reference, it is very, very important to indicate what the
> code is supposed to do. Also, there are a lot of ways of organizing and
> indenting if-then-else structures. It doesn't matter much which you
> choose, but you should not mix them in any one piece of code.
>
> Patricia- Hide quoted text -
>
> - Show quoted text -

I believe I have figured out the algorithm and flowchart for A = 3, B
= 1, C = 2 but doesn't this alogrithm,and flowchart work for any
combination of three values assigned to a, b, or c?

 Mark Space 06-28-2008 06:12 PM

Re: Beginniner Algorithm Question

popeyerayaz wrote:

> I believe I have figured out the algorithm and flowchart for A = 3, B
> = 1, C = 2 but doesn't this alogrithm,and flowchart work for any
> combination of three values assigned to a, b, or c?

Work? To do what?

You still haven't told us what the algorithm is supposed to do. There's
no criteria here for completing the assignment.

Please tell us what it does.

I can guess, due to the last print statement in the code, but you never
told us what the algorithm should do. Should it make a tree? Parse a
line of input? Build a graph? Compute a value, like an average? It does
none of these...

 Roedy Green 06-29-2008 01:24 AM

Re: Beginniner Algorithm Question

On Sat, 28 Jun 2008 07:02:59 -0700, "Ray Leon" <rayleon@qwest.net>
wrote, quoted or indirectly quoted someone who said :

>http://www.popeyeray.com/algorithm.htm

your algorithm does not extend easily to 7 items.

see http://mindprod.com/jgloss/biggest.html
--

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

 All times are GMT. The time now is 01:00 PM.