Programming Assignments

Am I moronic or is this assignment moronic? I think it might be me because I tend to have things click like a week or so after I complete the work. There's nothing in the book that really shows you how to do this and I don't like to use chat GPT unless I have to. Post your stupid assignments. I know my professor is a IQfytard so if you're here bro wassup I sit in the back with Long hair, not the fat guy.

Unattended Children Pitbull Club Shirt $21.68

Ape Out Shirt $21.68

Unattended Children Pitbull Club Shirt $21.68

  1. 1 month ago
    Anonymous

    Not your professor, but I bet you didn't pay attention during class.

    I suggest starting by searching what a stack in programming is.

    Then explore the Nice class and then fill in the methods one by one.

    If you can't do that, this course isn't for you.

    • 1 month ago
      Anonymous

      >those double doubles
      It's fricking over

  2. 1 month ago
    Anonymous

    This is actually a pretty reasonable assignment you can get very creative with.

    Just turn your brains on and shoot. SHOOT I tell you!

  3. 1 month ago
    Anonymous

    ngmi

  4. 1 month ago
    Anonymous

    >There's nothing in the book that really shows you how to do this
    there's probably something in the book that's just like that but it's called something else

  5. 1 month ago
    Anonymous

    isnt this just a linked list?

    • 1 month ago
      Anonymous

      It is, and a linked list is sometimes a reasonable implementation for a stack. However, I don't think that's the case here.
      This is the kind of synthetic example I hate about most beginner programming courses.
      Admittedly, trying to do better is quite hard and heavily depends on the target audience.

      • 1 month ago
        Anonymous

        This is the kind of synthetic example you give beginning students right after hello world. Given OP's confusion, hello world may be his limit.

        • 1 month ago
          Anonymous

          Maybe. But a stack solves a problem the students don't even know by that point. Which is another thing I hate about most beginner programming courses.
          Again, it's hard to avoid and I don't necessarily blame the instructor. I'd just like to see a course which avoids this kind of stuff.
          I consulted on a programming course specifically aimed at math students which ended up having very little of that. But that doesn't necessarily translate to other audiences.

  6. 1 month ago
    Anonymous

    There is very little you actually have to do. It’s a simple enough problem that the comments already contain the solution. I hope this is bait.

  7. 1 month ago
    Anonymous

    this is such a simple assignment bro just do it, this can't be a real post

    how the frick do you expect to finish your data structures class if you cant implement a fricking stack, the comments in there literally tell you exactly what to do. you don't need shit from the textbook just turn your brain on for a minute god damn

    here's what you do: grab a bunch of legos, and make a simple tower by putting one lego on top of the other. now disassemble the tower by taking one lego off the top until all the pieces are separate. congratulations, you just implemented a stack. now put that idea in code.

  8. 1 month ago
    Anonymous

    The "todo" comments are literally pseudocode for the solution. If you can't figure this out, get out of CS now.

  9. 1 month ago
    Anonymous

    I don't think you're cut out for programming

    • 1 month ago
      Anonymous

      no u...I'm actually one of the top students in my class

      • 1 month ago
        Anonymous

        Then probably none of you should be in a cs program. Even when I was in school 10 years ago most people were hopeless morons and you zoomers have only gotten dumber.

        • 1 month ago
          Anonymous

          if you were that smart you wouldn't be posting on 4chinz

          • 1 month ago
            Anonymous

            Have fun working helpdesk the rest of your life

          • 1 month ago
            Anonymous

            you're projecting. I'll be fine

      • 1 month ago
        Anonymous
      • 1 month ago
        Anonymous

        your school is pretty brave
        special needs students weren't allowed to touch computers around here, teachers were affraid they'd eat them or try to frick them

  10. 1 month ago
    Anonymous

    >linked list implementation due in 1 week
    >havent even started
    Bros...

  11. 1 month ago
    Anonymous

    CS is a scam. Your prof knows. The school knows. You’re handing them hundreds every time you go (or don’t go) to class. All that money spent to be unemployed or flipping burgers. GET OUT.

  12. 1 month ago
    Anonymous

    >need to write hello world in python AND in Java
    >only have 3 months to do it
    This is fricking bullshit when am I even going to need to print out "hello world" in the real world. I'm going to complain to the dean.

  13. 1 month ago
    Anonymous

    >obvious stack implementation
    >people keep calling it a linked list
    the thread in which those who respond are more moronic than op

    • 1 month ago
      Anonymous

      >he doesn't know the difference between a data structure and an abstract data type.
      NGMI

    • 1 month ago
      Anonymous

      >its not a linked list
      Found the JS dev. This is literally just a linked list with some tacked on rules about how to insert and how to access elements.

      • 1 month ago
        Anonymous

        >MUH linked list!!
        Found the cnile. It's literally just a vector with last item popping and pushing.

        • 1 month ago
          Anonymous

          a vector has no need for a reference to the next or prev element, also a vector contains explicitly the element and not a node that represents that element as in a linked list
          this is a linked list, not a vector or a stack

        • 1 month ago
          Anonymous

          >t.moron
          private Node top;

          That's a strange way to write a vector. Hmm node don't they usually point to more nodes and those nodes contain data. That sure sounds like a linked list. The more I am on this site the more convinced I am that half of you are just chatGPT.

          • 1 month ago
            Anonymous

            i am conscious anon and you are correct
            i dunno why these "people" cant see it

          • 1 month ago
            Anonymous

            I think they are so up their ass about how they would write it that they forgot how it was actually written.

          • 1 month ago
            Anonymous

            you couldn't even directly access the nth element of it meaning you'd have to traverse the entire list going by each Node's next
            doesn't that make it specifically not a vector??

          • 1 month ago
            Anonymous

            >private Node top;
            and? top is the last element. Holy shit cniles are fricking moronic.

          • 1 month ago
            Anonymous

            >Top is the last element
            Yeah the last element of a linked list. I wasn't the moron calling it a vector.

            >The way the professor has it forces the students to actually learn the language.
            wrong
            the standard library is part of the language. students should learn to use it, not disregard it. students should learn to solve actual problems, not reinvent the wheel or force specific solutions on problems that those solutions aren't best for (e.g. using recursion for iterative problems)
            you don't need to reimplement a linked list to learn a language. it would be sufficient to just give a brief explanation and then present some examples when it works best and when a different solution is better. in practice you will not reimplement something that's in the standard library.

            >They should learn to use the standard library
            Maybe if this was a boot camp. The point of college isn't to teach you a specific language, but to teach you the fundamentals of computer science. That means understanding and implementing things like linked list and the stack. Lessons are meant to teach more than just what is assigned. This is such a simple assignment that using the standard libraries would make it pointless.

      • 1 month ago
        Anonymous

        Found the moron Black person

        • 1 month ago
          Anonymous

          good argument

  14. 1 month ago
    Anonymous

    yeah there were plenty of morons who couldn't do simple shit like this in CS

    • 1 month ago
      Anonymous

      bro it's like my second CS class and I go to a shit school they don't even explain the difference between class and instance variables our book is literally Head First Java I'll be fine I always understand the concepts by the time the exam rolls around.

      • 1 month ago
        Anonymous

        First post is correct, you should play with it in your ide until you find the answer.
        If you don’t find the answer but end up doing something somewhat interesting or unexpected, learn why it behaves that way. Keep going until you’re out of ideas, if it’s still unanswered then look up stack sorting and learn how it works.
        Most people here are just memeing, this question is extremely basic but everyone has a unique way of approaching problems, you will quickly answer some questions that others get stumped on & vice versa.
        Good luck starting cs in 2020+4

        • 1 month ago
          Anonymous

          >Good luck starting cs in 2020+4
          w-what is that supposed to mean. Is it over before I even begin? I got memed into learn 2 code.

        • 1 month ago
          Anonymous

          But honestly to answer your question, you’re moronic & the question is moronic.
          I didn’t go to college & I’ve never been asked to complete a task so asinine. My tasks have always been
          >we need this, can u do
          >yes
          >5 hours later push to repo

          • 1 month ago
            Anonymous

            okay good I knew I was moronic but as long as the question is moronic then I'm good it's all good bro I'm gonna make it

  15. 1 month ago
    Anonymous

    a Stack is not a linked list. your prof is a moron and you are a lazy piece of shit

    https://developer.classpath.org/doc/java/util/Stack-source.html

    • 1 month ago
      Anonymous

      you are mean and I bet you work a lame job. I'll probably be your boss because I have social skills and what you've all failed to realize is that a degree and social skills are what really matter in this world. Belief that skill is everything is an autistic mindset.

      • 1 month ago
        Anonymous

        initially the top is null set is as null. Well guess what? If you don't initialize it with new-command it is by default, null.

        The problem here is that this class only stores the topmost Node. Where the hell they expect to store the rest nodes? In real source code they are stored in a dynamic array (i.e. static array that is expanded when needed)

        • 1 month ago
          Anonymous

          that's what was fricking me up like I would be better off if he didn't provide any code.

          • 1 month ago
            Anonymous

            You can make it explicite, he probably wants that. this.top=null;
            Does not do god damn thing but lets please the professors or you will not get that PhD position.

          • 1 month ago
            Anonymous

            needs to be done like this, no? if you don't make a node class you can't produce new nodes?

          • 1 month ago
            Anonymous

            holy shit the height of my screenshot is 1488 pixels that's so based XD

    • 1 month ago
      Anonymous

      >stack is not a linked list
      A stack can be a linked list. A stack is an abstract data structure. It can be implemented using vectors, continuous memory or through a linked list. You're a moron for not understanding this. Yeah I would never go into production with that code, but this is more about teaching college kids how to write code not implement the most optimized solution.

      • 1 month ago
        Anonymous

        teaching students that "you can also do this in a different, moronic way" is not something you do early in their education

        • 1 month ago
          Anonymous

          >not a good way
          Yes it is. This assignment would literally just be wrapping one of Javas default collection types if you allowed students to do it the right way. The way the professor has it forces the students to actually learn the language. It also circumvents the capacity issue if you just used an array. This lesson is actually teaching them how the language works as well as who to implement things they learned in class like a linked list.

          • 1 month ago
            Anonymous

            >The way the professor has it forces the students to actually learn the language.
            wrong
            the standard library is part of the language. students should learn to use it, not disregard it. students should learn to solve actual problems, not reinvent the wheel or force specific solutions on problems that those solutions aren't best for (e.g. using recursion for iterative problems)
            you don't need to reimplement a linked list to learn a language. it would be sufficient to just give a brief explanation and then present some examples when it works best and when a different solution is better. in practice you will not reimplement something that's in the standard library.

    • 1 month ago
      Anonymous

      You remind me of a zoomer I interviewed who thought - and was unwilling to change his mind on this - that a 2-d array was a deque, a deque was a 2-d array, and that was the end of the matter.
      He didn't get the job.

      • 1 month ago
        Anonymous

        Why would you implement a deque using a 2D array?

  16. 1 month ago
    Anonymous

    It's a very reasonable assignment.
    >There's nothing in the book that really shows you how to do this
    There definitely is. Even if there wasn't, how hard is it to search "What is a stack data structure?"

  17. 1 month ago
    Anonymous

    Oh wait Node has children Nodes. You need to make new Node.

    Node newNode=new Node(); //yes, sounds moronic
    //in here you insert the data to node

    //then you make it as a parent Node
    newNode.appendchild(this.top);
    //then you upgrade it as top node
    this.top=newNode;

  18. 1 month ago
    Anonymous

    It’s a stack, implemented using a linked list (this does not make it a linked list, as some people are saying).
    This question is very easy, if you already knew how to program you could do it in a couple of minutes.

    What part of it is tripping you up?

    • 1 month ago
      Anonymous

      >being a linked list does not make it a linked list
      anon, i...

      • 1 month ago
        Anonymous

        Most maps are backed by vectors, does that make them vectors?

        • 1 month ago
          Anonymous

          yes

    • 1 month ago
      Anonymous

      >implemented using a linked list
      it literally says
      >private Node top;
      you're not meant to use a a LinkedList to implement it

      it would be interesting which university does OP go to, I remember doing the exact same assignment 10 years ago, even the comments looks the same

      • 1 month ago
        Anonymous

        >you're meant to use a a Linked List to implement it
        ftfy

      • 1 month ago
        Anonymous

        >you're not meant to use a a LinkedList to implement it
        >Node
        >Make the new node's next point to the _OLD_ top
        If this "Node" struct is not the node of a linked list then enlighten the class.

  19. 1 month ago
    Anonymous

    bruh

    • 1 month ago
      Anonymous

      bruh I like am just figuring out reference data types so like yeah it's all good I got this

  20. 1 month ago
    Anonymous

    WE'RE FRICKING BACK I finally understand everything and basically I'm going to be rich.

    • 1 month ago
      Anonymous

      You have seen the job market for tech, right?

      • 1 month ago
        Anonymous

        I'm going to make it brah, we're all going to make it.

  21. 1 month ago
    Anonymous

    >these replies

  22. 1 month ago
    Anonymous

    I hate university education so much.

  23. 1 month ago
    Anonymous

    the comments tell you what to do step by step, wtf dude

  24. 1 month ago
    Anonymous

    I got two Front-end job jobs paying $1k and $3k without ever solving any of thoses, but you do need to know them, it's important to be familiarized with it.

  25. 1 month ago
    sage

    you can't be older than 20 holy fricking shit
    go rizz up your ass, homosexual

  26. 1 month ago
    Anonymous

    its moronic in the sense that the work has all already been done for you so anybody who isn't beyond help (you) isn't going to learn anything

  27. 1 month ago
    Anonymous

    Can someone provide the solution? I don't understand where all these magic variables are coming from, but i didnt look more than 3 seconds at the code

    • 1 month ago
      Anonymous

      Yeah bro I solved it I just woke up I’ll post the solution in a sec. These guys are just Dicks that was the problem I had as well. They’re all reference variables that you need a class to instantiate.

  28. 1 month ago
    Anonymous

    >public class
    stopped reading right there
    OOP in loo never solved a single problem.

  29. 1 month ago
    Anonymous

    homie you only need an array and a pointer to keep track of the stack's top.

    • 1 month ago
      Anonymous

      The project is clearly babby's first linked data structure. Having it be as simple as possible, and as familiar as possible are good things. Or would you prefer, as

      >The way the professor has it forces the students to actually learn the language.
      wrong
      the standard library is part of the language. students should learn to use it, not disregard it. students should learn to solve actual problems, not reinvent the wheel or force specific solutions on problems that those solutions aren't best for (e.g. using recursion for iterative problems)
      you don't need to reimplement a linked list to learn a language. it would be sufficient to just give a brief explanation and then present some examples when it works best and when a different solution is better. in practice you will not reimplement something that's in the standard library.

      seems to, that the student's first exposure to linked structures be fibonacci heaps or dependency graphs? Yes it's bullshit, but it's preparatory bullshit, that's why it's school not a job.

  30. 1 month ago
    Anonymous

    if you feel confused by this, then yngmi. change your major.

    • 1 month ago
      Anonymous

      You’re probably self taught, loser.

  31. 1 month ago
    Anonymous

    this is a standard 1°/2° semester assignment bro, just think about it

  32. 1 month ago
    Anonymous

    >stack
    >constructor
    even

  33. 1 month ago
    Anonymous

    The teacher is asking your for ~5 lines of code and you're shitting your pants?

    Maybe programming is not for you

Your email address will not be published. Required fields are marked *