Thread: Anybody good at Algorithm design?

1. Anybody good at Algorithm design?

I need some help on a problem...

2. Re: Anybody good at Algorithm design?

sorry dude, I never did have much rhythm

3. Re: Anybody good at Algorithm design?

Wow, jd.

Depends on what you mean, hang.

4. Re: Anybody good at Algorithm design?

....problem is
problem:

5. Re: Anybody good at Algorithm design?

Dunno about the programming part but the formula for calculating the price could look something like this:

Variables:
Code:
```Name:                                    Value:                    Abbreviation:
750+ square inches                 1/0                        A
Mahogany                               1/0                        B
Oak                                        1/0                        C
Cherry                                    1/0                        D
Pine                                        1/0                        E
Drawers                                  0 to infinite             F```
Code:
`175+(A*75)+(B*200)+(C*150)+(D*100)+(E*0)+(F*35)=Price of the desk`

EDIT: The text is jumping around like crazy but you get the idea.

EDIT 2: Changed the drawers value range from "1-infinite" to "0-infinite" as NightrainSrt4 suggested.
I didn't read the assignment properly

6. Re: Anybody good at Algorithm design?

Diamon has it well laid out. But change the 1 in Drawers to be 0, as you can have 0 drawers in the desk. You would initialize everything to zero, and only change the values of the variables the user specifies.

Your instructor should have explained how he wanted the program plan, introduction, etc, as that is the Software Engineering part of the problem, and I'm sure he/she has specific requirements/method of teaching you.

7. Re: Anybody good at Algorithm design?

Its an online class with zero direction thanks For the help.

8. Re: Anybody good at Algorithm design?

Or, alternately:

Variables:
Code:
```Name:                                    Value:                    Abbreviation:
750+ square inches                 1/0                        A
WoodType                              0/100/150/200        B
Drawers                                  0 to infinite             F```
Code:
`175+(A*75)+B+(F*35)=Price of the desk`
Single bigger variable instead of four smaller ones, more complicated code when assigning values, but simpler algorithm when finding end price. It all depends on what is more important in the specific circumstance.

Also, as a side note, that's an absurd pricing criteria. (I know, you didn't make it up. Still, it had to be said.)

9. Re: Anybody good at Algorithm design?

what should the program plan consist of? Just an explanation of how this algorithm works?

10. Re: Anybody good at Algorithm design?

I would usually just explain what the variables mean in my programs,

however writing a field stating where the algo starts and a small explanation shouldn't hurt.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•