Results 1 to 10 of 10

Thread: Anybody good at Algorithm design?

  1. #1

    Default Anybody good at Algorithm design?

    I need some help on a problem...
    Please read the TOS regarding links in signatures. We don't take kindly to that sort of thing. -The Mods

  2. #2
    iShot the Sheriff jdbnsn's Avatar
    Join Date
    Jan 2006
    Location
    Normal
    Posts
    8,241

    Default Re: Anybody good at Algorithm design?

    sorry dude, I never did have much rhythm
    "At the midpoint on the journey of life, I found myself in a dark forest, for the clear path was lost..." -Dante Alighieri

  3. #3
    The floppy drive is no longer obsolete. AmEv's Avatar
    Join Date
    Nov 2010
    Location
    Idaho, USA
    Posts
    3,052

    Default Re: Anybody good at Algorithm design?

    Wow, jd.


    Depends on what you mean, hang.
    Two years. They were great. Let's make the next ones even better!

    Tri.fecta

  4. #4

    Default Re: Anybody good at Algorithm design?

    ....problem is
    problem:
    Please read the TOS regarding links in signatures. We don't take kindly to that sort of thing. -The Mods

  5. #5
    Water Cooled Diamon's Avatar
    Join Date
    May 2010
    Location
    Sweden
    Posts
    516

    Default 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
    Projects: RGB Tower - Custom CPU water block

    Watching someone else use your computer is like watching a drunk orangutan solve a rubix cube. They have no idea what they're doing and you just wish they'd hand you the damn thing so you can do it yourself.
    -TheOatmeal

  6. #6
    Code Monkey NightrainSrt4's Avatar
    Join Date
    Jun 2007
    Location
    Your cookie jar
    Posts
    2,679

    Default 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. #7

    Default Re: Anybody good at Algorithm design?

    Its an online class with zero direction thanks For the help.
    Please read the TOS regarding links in signatures. We don't take kindly to that sort of thing. -The Mods

  8. #8
    Will YOU be ready when the zombies rise? x88x's Avatar
    Join Date
    Oct 2008
    Location
    MD, USA
    Posts
    6,334

    Default 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.)
    That we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously.
    --Benjamin Franklin
    TBCS 5TB Club :: coilgun :: bench PSU :: mightyMite :: Zeus :: E15 Magna EV

  9. #9

    Default Re: Anybody good at Algorithm design?

    what should the program plan consist of? Just an explanation of how this algorithm works?
    Please read the TOS regarding links in signatures. We don't take kindly to that sort of thing. -The Mods

  10. #10
    DerGanove Ichbin's Avatar
    Join Date
    May 2006
    Location
    In the World of Tommorow!
    Posts
    1,333

    Default 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
  •