Step 1 Doubly Linked List Class From the lecture material create a doubly linked list class. This class should be generi

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Step 1 Doubly Linked List Class From the lecture material create a doubly linked list class. This class should be generi

Post by answerhappygod »

Step 1 Doubly Linked List Class From The Lecture Material Create A Doubly Linked List Class This Class Should Be Generi 1
Step 1 Doubly Linked List Class From The Lecture Material Create A Doubly Linked List Class This Class Should Be Generi 1 (29.04 KiB) Viewed 13 times
Step 1 Doubly Linked List Class From The Lecture Material Create A Doubly Linked List Class This Class Should Be Generi 2
Step 1 Doubly Linked List Class From The Lecture Material Create A Doubly Linked List Class This Class Should Be Generi 2 (39.58 KiB) Viewed 13 times
Step 1 Doubly Linked List Class From the lecture material create a doubly linked list class. This class should be generic so that it will operate on any given type. Your class should have the ability to add to the front, add to the rear, insert (you can insert before or after a node), delete, and find. Your list class should also implement functionality that will allow you traverse the list forward and backward. As for the naming conventions and interface into the list I will leave all of that up to you. Step 2 Stack and Queue Using the linked list class you created in Step 1 create stack and queue classes. I will leave it up to you as to whether to use composition or inheritance but whatever way you choose to go you should be able to explain why you chose the relationship type you did. The stack class should have the following interface • push . pop . peek The queue should have the following interface enqueue . dequeue . peek Again I will leave it up to you as to the parameters to the functions and the return type. As usual please have good reasoning for why you have been doing things.
Step 3 The RPN Calculator By now you should have a working stack and queue. Use the Stack to create an RPN calculator. You will have to make a decision whether you want to use inheritance or simple composition to make the RPN calculator work. You will also have to make a decision as to what the interface into the RPN calculator is. One of the things that needs to be considered is parsing the input. We know that an RPN calculator will operate on an expression like so: 325*+ but what happens if someone puts more that one space in between each token of the input? You will need to handle something things like: 3 25 What you should do is allow the interface to take a string type and then parse the tokens out of the string. Step 4 Infix Notation Calculator Infix notation is an expression like this: 3+2*5 In this step you are to create a calculator that allows for expression like the above. Your calculator should support +.../. This is an extremely difficult thing to solve because we need to consider the operator precedence. The best way to solve the problem is to convert the infix to postfix (RPN). You may be wondering how to convert from infix to postfix. Well, there are several algorithms out there that you can find but I have included an algorithm and source code written in C#. You can read about the algorithm and download the code here. 2 Your infix notation calculator must be derived from RPN Calculator. In my mind you are going to want to use the input parser and the RPN algorithm once the infix has been converted to postfix.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply