Programming Fundamentals [Coding]

Discussion in 'Homework Help' started by Jeff, Mar 16, 2015.

Programming Fundamentals [Coding]
  1. Unread #1 - Mar 16, 2015 at 8:59 AM
  2. Jeff
    Joined:
    Apr 16, 2011
    Posts:
    11,405
    Referrals:
    26
    Sythe Gold:
    3,170
    Two Factor Authentication User MushyMuncher Christmas 2014 Christmas 2015 Easter 2016 Sythe's 10th Anniversary Pizza Muncher Homosex Extreme Homosex SytheSteamer
    Lawrence

    Jeff Previously named: Jeff.

    Programming Fundamentals [Coding]

    Hey guys, ultra stuck on this uni problem.

    So I'll post the question, available commands and the code:

    [​IMG]

    tldr

    Need to guide the beetle (Clara) through the maze until she finds the leaf. Once on the leaf, Clara needs to eat the leaf and stop.

    The code needs to be generic enough to work in any maze scenario.


    [​IMG]


    [​IMG]


    [​IMG]

    From memory, there's a stop(); command. If such command is not needed, then don't worry about it.


    *removed*


    If that doesn't work, here is MyClara.java:

    Code:
    /**
     * MyClara is a subclass of Clara. Therefore, it inherits all methods of Clara: <p>
     * 
     * PERMITTED COMMANDS
     * Actions:     move(), turnLeft(), turnRight(), putLeaf(), removeLeaf()
     * Sensors:     onLeaf(), treeFront()
     * JAVA:        if, else, while, for, !, &&, ||
     */
    public class MyClara extends Clara 
    {   
        /**
         * In the 'run()' method you can write your program for Clara <br>
         */
        public void run() 
        {
    		// TODO: Write your code below
    		
        }
    
    }
    

    If anything is unclear, please ask.

    Thanks.

    Edit: Download link: http://wikisend.com/download/217686/P3_code(5).zip
     
  3. Unread #2 - Mar 16, 2015 at 9:46 AM
  4. Superfluous
    Joined:
    Jul 5, 2012
    Posts:
    18,934
    Referrals:
    5
    Sythe Gold:
    9,128
    Vouch Thread:
    Click Here
    Discord Unique ID:
    247909953925414913
    Discord Username:
    .superfluous.
    Air Fryer DIAF m`lady Le Kingdoms Player STEVE Creamy

    Superfluous Rainbet.com Casino & Sportsbook

    Programming Fundamentals [Coding]

    The link needs a login :/ - if you can give us a direct download I can walk you through this tonight. Added you on skype as well
     
  5. Unread #3 - Mar 16, 2015 at 9:52 AM
  6. kmjt
    Joined:
    Aug 21, 2009
    Posts:
    14,450
    Referrals:
    8
    Sythe Gold:
    449

    kmjt -.- The nocturnal life chose me -.-
    Banned

    Programming Fundamentals [Coding]

    This looks kind of fun. Message me on Skype and I will help guide you through it (for free of course) :p
     
  7. Unread #4 - Mar 17, 2015 at 2:31 AM
  8. Jeff
    Joined:
    Apr 16, 2011
    Posts:
    11,405
    Referrals:
    26
    Sythe Gold:
    3,170
    Two Factor Authentication User MushyMuncher Christmas 2014 Christmas 2015 Easter 2016 Sythe's 10th Anniversary Pizza Muncher Homosex Extreme Homosex SytheSteamer
    Lawrence

    Jeff Previously named: Jeff.

    Programming Fundamentals [Coding]

    Accepted your request.

    I think I only have your old Skypes added.

    I was about to add your new Skype (KMJTtrade), however 3 different ones popped up in my search, and I can't tell which one is you because I'm using gay Windows 8.

    If you're able to add me on your new one or message me from one of your old ones, that'd be awesome.

    Skype: jefff3.

    Cheers guys


    Edit: Download link: http://wikisend.com/download/217686/P3_code(5).zip
     
  9. Unread #5 - Mar 17, 2015 at 9:03 AM
  10. Superfluous
    Joined:
    Jul 5, 2012
    Posts:
    18,934
    Referrals:
    5
    Sythe Gold:
    9,128
    Vouch Thread:
    Click Here
    Discord Unique ID:
    247909953925414913
    Discord Username:
    .superfluous.
    Air Fryer DIAF m`lady Le Kingdoms Player STEVE Creamy

    Superfluous Rainbet.com Casino & Sportsbook

    Programming Fundamentals [Coding]

    chrome still says the dl is malicious, hm
     
  11. Unread #6 - Mar 17, 2015 at 2:38 PM
  12. Meteor
    Joined:
    Mar 3, 2015
    Posts:
    2,852
    Referrals:
    2
    Sythe Gold:
    753
    born 2late 2 explore the earth b0rn 2soon 2 explore the galaxy born just in time 2 browse sith d0t org Toast Wallet User Lanturn

    Meteor Grand Master
    Retired Global Moderator

    Programming Fundamentals [Coding]

    Do you still need help with this?
     
  13. Unread #7 - Mar 18, 2015 at 10:37 AM
  14. Jeff
    Joined:
    Apr 16, 2011
    Posts:
    11,405
    Referrals:
    26
    Sythe Gold:
    3,170
    Two Factor Authentication User MushyMuncher Christmas 2014 Christmas 2015 Easter 2016 Sythe's 10th Anniversary Pizza Muncher Homosex Extreme Homosex SytheSteamer
    Lawrence

    Jeff Previously named: Jeff.

    Programming Fundamentals [Coding]

    Superfluous helped me a tonne, I'll probably have more problems I'll get stuck on next week haha..

    Thanks guys.
     
  15. Unread #8 - Mar 18, 2015 at 4:54 PM
  16. kmjt
    Joined:
    Aug 21, 2009
    Posts:
    14,450
    Referrals:
    8
    Sythe Gold:
    449

    kmjt -.- The nocturnal life chose me -.-
    Banned

    Programming Fundamentals [Coding]

    Just curious, is this an algorithm course?
     
  17. Unread #9 - Mar 18, 2015 at 5:16 PM
  18. Superfluous
    Joined:
    Jul 5, 2012
    Posts:
    18,934
    Referrals:
    5
    Sythe Gold:
    9,128
    Vouch Thread:
    Click Here
    Discord Unique ID:
    247909953925414913
    Discord Username:
    .superfluous.
    Air Fryer DIAF m`lady Le Kingdoms Player STEVE Creamy

    Superfluous Rainbet.com Casino & Sportsbook

    Programming Fundamentals [Coding]

    Guessing intro programming
     
  19. Unread #10 - Mar 19, 2015 at 9:10 AM
  20. Devon555
    Joined:
    Mar 19, 2015
    Posts:
    1
    Referrals:
    0
    Sythe Gold:
    0

    Devon555 Newcomer

    Programming Fundamentals [Coding]

    Hey Jeff,

    I'm stuck on problems 2 and 3 of this weeks prac as well.

    Any help or hints with the code would be highly appreciated.

    Thanks in advance
     
  21. Unread #11 - Mar 23, 2015 at 6:14 PM
  22. 70i
    Joined:
    Jan 11, 2014
    Posts:
    462
    Referrals:
    0
    Sythe Gold:
    174

    70i Forum Addict
    Banned

    Programming Fundamentals [Coding]

    Keep track of your moves on a stack. When you have to backtrack (go back from where you came) pop the stack. This way you'll know where you came from wherever you are.

    Ex
    up, up, right (backtrack and pop) -> up up
    So you know not to go down or to the right (because you just came from there). Which leaves the only option of up.
     
  23. Unread #12 - Mar 24, 2015 at 2:48 AM
  24. kmjt
    Joined:
    Aug 21, 2009
    Posts:
    14,450
    Referrals:
    8
    Sythe Gold:
    449

    kmjt -.- The nocturnal life chose me -.-
    Banned

    Programming Fundamentals [Coding]




    Lool who is this guy? Jeff your classmate is stalking you bruh. His game is strong.
     
  25. Unread #13 - Apr 12, 2015 at 10:55 AM
  26. Jeff
    Joined:
    Apr 16, 2011
    Posts:
    11,405
    Referrals:
    26
    Sythe Gold:
    3,170
    Two Factor Authentication User MushyMuncher Christmas 2014 Christmas 2015 Easter 2016 Sythe's 10th Anniversary Pizza Muncher Homosex Extreme Homosex SytheSteamer
    Lawrence

    Jeff Previously named: Jeff.

    Programming Fundamentals [Coding]

    lmao

    Bump, need assistance again.

    Cheers
     
  27. Unread #14 - Apr 13, 2015 at 11:26 AM
  28. Jeff
    Joined:
    Apr 16, 2011
    Posts:
    11,405
    Referrals:
    26
    Sythe Gold:
    3,170
    Two Factor Authentication User MushyMuncher Christmas 2014 Christmas 2015 Easter 2016 Sythe's 10th Anniversary Pizza Muncher Homosex Extreme Homosex SytheSteamer
    Lawrence

    Jeff Previously named: Jeff.

  29. Unread #15 - Apr 13, 2015 at 12:55 PM
  30. Superfluous
    Joined:
    Jul 5, 2012
    Posts:
    18,934
    Referrals:
    5
    Sythe Gold:
    9,128
    Vouch Thread:
    Click Here
    Discord Unique ID:
    247909953925414913
    Discord Username:
    .superfluous.
    Air Fryer DIAF m`lady Le Kingdoms Player STEVE Creamy

    Superfluous Rainbet.com Casino & Sportsbook

    Programming Fundamentals [Coding]

    Hmu tonight if you see me on
     
  31. Unread #16 - Apr 16, 2015 at 8:03 PM
  32. Jeff
    Joined:
    Apr 16, 2011
    Posts:
    11,405
    Referrals:
    26
    Sythe Gold:
    3,170
    Two Factor Authentication User MushyMuncher Christmas 2014 Christmas 2015 Easter 2016 Sythe's 10th Anniversary Pizza Muncher Homosex Extreme Homosex SytheSteamer
    Lawrence

    Jeff Previously named: Jeff.

    Programming Fundamentals [Coding]

    I've messaged you on Skype.

    Thanks
     
  33. Unread #17 - Apr 19, 2015 at 6:50 AM
  34. Jeff
    Joined:
    Apr 16, 2011
    Posts:
    11,405
    Referrals:
    26
    Sythe Gold:
    3,170
    Two Factor Authentication User MushyMuncher Christmas 2014 Christmas 2015 Easter 2016 Sythe's 10th Anniversary Pizza Muncher Homosex Extreme Homosex SytheSteamer
    Lawrence

    Jeff Previously named: Jeff.

    Programming Fundamentals [Coding]

    Bump.

    Still need assistance please.
     
  35. Unread #18 - Apr 20, 2015 at 7:39 PM
  36. 70i
    Joined:
    Jan 11, 2014
    Posts:
    462
    Referrals:
    0
    Sythe Gold:
    174

    70i Forum Addict
    Banned

    Programming Fundamentals [Coding]

    How about trying something first, and then ask a question. No one is going to do it for you unless you pay them. I explained in my last post how it can be done.
     
  37. Unread #19 - Apr 21, 2015 at 5:10 AM
  38. Jeff
    Joined:
    Apr 16, 2011
    Posts:
    11,405
    Referrals:
    26
    Sythe Gold:
    3,170
    Two Factor Authentication User MushyMuncher Christmas 2014 Christmas 2015 Easter 2016 Sythe's 10th Anniversary Pizza Muncher Homosex Extreme Homosex SytheSteamer
    Lawrence

    Jeff Previously named: Jeff.

    Programming Fundamentals [Coding]

    This is for a different question lmao

    Now hop off your high horse xDDD
     
  39. Unread #20 - Apr 21, 2015 at 7:11 AM
  40. Superfluous
    Joined:
    Jul 5, 2012
    Posts:
    18,934
    Referrals:
    5
    Sythe Gold:
    9,128
    Vouch Thread:
    Click Here
    Discord Unique ID:
    247909953925414913
    Discord Username:
    .superfluous.
    Air Fryer DIAF m`lady Le Kingdoms Player STEVE Creamy

    Superfluous Rainbet.com Casino & Sportsbook

    Programming Fundamentals [Coding]

    If you want to pm me the info, I'll give it a look this afternoon and hopefully have something that will help you written this evening. Sorry, just been really, really busy these past ten days (and next five) or so.
     
< [Help]Grade 12 English Work[Easy Money] | Help with some simple mean, averages, ect >

Users viewing this thread
1 guest


 
 
Adblock breaks this site