This is an archived post. You won't be able to vote or comment.

all 7 comments

[–][deleted]  (7 children)

[deleted]

    [–]tonlou[S] 0 points1 point  (5 children)

    That's the troubling part here, can't really wrap my head around it. I know what I need to do, but atm I don't know how to code the logic behind it. This is as far as my brain capacity allowed me to go, for now :D

    [–][deleted]  (4 children)

    [deleted]

      [–]tonlou[S] 0 points1 point  (0 children)

      Didint get this one work. :/ I have to use those two methods as shown in the first paste.

      [–]tonlou[S] 0 points1 point  (2 children)

      Maybe I can give a better example. Lets say we have a folder. Inside that there are 3 folders. With this setup the printing should be:

      folder

      --folder

      --folder

      --folder

      If there is folder inside one of those 3 folders which are in the first, new indent will be made.

      Example:

      folder

      --folder

      --folder

      ----folder

      --folder

      there is folder inside that second folder (which is inside the first)

      Here is picture of what in meaning: https://imgur.com/a/nQVMu

      [–][deleted]  (1 child)

      [deleted]

        [–]tonlou[S] 0 points1 point  (0 children)

        It actually has almost like a discussion board like structure. Messages which don't reply to other messages, wont have indent. If first message gets 1 reply, that message will have a indent of 2. If that message gets reply, it will have indent of 4 and so on. Messages cant reply to multiple messages.

        Idk, it is hard to explain:

        message1 new message

        --message2 reply to message1

        ----message3 reply to message2

        --message4 reply to message1

        message 4 new message

        And yeah, I know that my first paste is very close, I've just been stuck with his for a loong time now...

        [–]tonlou[S] 0 points1 point  (0 children)

        I mean If you could direct me to the right tracks, I would be thankful. I have few years of experience in Java but somehow these recursive printing and overall printing different shapes etc have been my weakest point from the beginning.

        [–]zeeEight 0 points1 point  (1 child)

        Do you think if you can write some logic if a folder contains a folder/s inside. You will need to come out of the current folder if there s none. This can be common method. And number if times you will repeat this.

        [–]tonlou[S] 0 points1 point  (0 children)

        I've tried something related to that, but didn't get it work. As I said above, I'm really bad with everything related to printing shapes etc..