I need a Programmer to look at my Java code for college project

ปิด โพสต์แล้ว 3 ปีที่ผ่านมา ชำระเงินเมื่อจัดส่ง
ปิด ชำระเงินเมื่อจัดส่ง

Postfix calculator with map, stack, etc.

Here is the assignment description:

In this assignment, you will implement a postfix calculator. This program allows a user to enter operands and operators at the command line and calculates the result as a postfix calculator would.

You will get some experience with nested classes and with Java collections.

What do you need to do?

I have provided you with the following interfaces and classes:

* Stack – generic interface defining stack methods 


* StackTest – testing class for your DoubleStack implementation. 


* Operator – interface for operator objects 


* CalcTest – testing class that reads tokens from standard input and evaluates them with a postfix calculator 


1. Write a DoubleStack class that implements Stack<Double>. You may not use the [login to view URL] class for this. However, you may use a Java Collection class in your implementation. (I suggest looking at LinkedList for this. Let the library code do the heavy lifting here. Don’t reinvent the wheel.) 


2. Write a PostfixCalculator class.
• You should have two private member variables in this class 
– A stack of double operands (Didn’t you just write a class for that? Use it!) – A map of strings to operator objects. (something like 
private Map<String, Operator> operatorMap;) 


• The constructor should fill the operator map with associations of symbols to operator objects as described in the table below. You will have to create multiple implementations of the operator interface in order to do this.

The Operator implementations should be nested inside the PostfixCalculator class. It is up to you if you make them static nested classes, non-static inner classes, local classes, or anonymous classes, but they must all be inside PostfixCalculator somehow.

• The storeOperand method takes a double and pushes it onto the operand stack. It does not return anything.

• The evalOperator method takes an operator string, looks up the corresponding operator object in the operator map, pops the appropriate number of operands (as given by the numArgs method) and places them into a list, evaluates the operator with the operands in the list, and pushes the result onto the operand stack. It does not return anything, but operators may have side effects, such as printing the argument to standard output.

3. Test your code.

Operators

Your calculator should recognize the following operators. Note that there can be more than one symbol for a given operation. (For example, 1 2 + would have the same result as 1 2 add)

Name Symbol # Arguments Result

addition + add 2 Sum of arguments A B + → A+B

subtraction - sub 2 Difference of arguments A B - → A-B

multiplication * mult 2 Product of arguments

division / div 2 Quotient of arguments

print = print 1 Print argument to standard out and return argument

Turning in your assignment

Once you are done with your assignment, turn in [login to view URL] and PostfixCalculator.java. You should not have changed any of the classes I provided you, so do not submit them.

-------------------

I am done with the double stack class, only postfix [login to view URL] has to be fixed. I am not too familiar with using map<string,operator> in java.

Java

หมายเลขโปรเจค: #29549383

เกี่ยวกับโปรเจกต์

13 ข้อเสนอ โปรเจกต์ระยะไกล ใช้งาน %project.latestActivity_relativeTime|แทนที่%

freelancer 13 คน กำลังเสนอราคาในงานนี้ โดยมีราคาเฉลี่ยอยู่ที่ $29

urmate

Hi there I have excellent programming skills related to your project. I have read your project descriptions and consider myself the best fit for this job. I can provide a quality solution for your project. Thanks Far เพิ่มเติม

$75 USD ใน 3 วัน
(489 รีวิว)
7.3
$30 USD ใน 2 วัน
(14 รีวิว)
4.2
theatasolution1

Hello, I'm an expert Java developer with experience in object-oriented, data structure, swing, JavaFX and more advanced. I can help you to finish this project with great quality. We can negotiate on price/Budget Regard เพิ่มเติม

$20 USD ใน 1 วัน
(14 รีวิว)
3.9
CodingHelpLine

Hello Sir/Madam I have development experience in various Programming Languages, OOP, Data Structures, Database Driven applications, APIs, Files handling and Data Transformation, ETL and various frameworks. I assure yo เพิ่มเติม

$50 USD ใน 3 วัน
(15 รีวิว)
3.2
Texume

Hi, I'm a senior Java developer with more than 6 years of experience. I can implemented the calculator for you using the provided class. if you are interested please contact me.

$30 USD ใน 2 วัน
(8 รีวิว)
3.2
MouaadErrami

Hi I have read the instructions carefully and I clearly understand what is required of the project. i can start your project right now, and i have good experience in java free to contact me for more details. best reg เพิ่มเติม

$20 USD ใน 1 วัน
(1 รีวิว)
1.5
balasaravanan95

Hi, I'm a professional Java Developer and have suitable technical expertise required for this Project. Have gone through your project details . I can surely help you with this. Work could be completed within 2 days w เพิ่มเติม

$20 USD ใน 2 วัน
(0 รีวิว)
0.0
nandiwalebasha

I have 5.5 years experience in Java spring Hibernate rest services and CICD using teamcity and nolio tool.

$15 USD ใน 1 วัน
(0 รีวิว)
0.0
moazambloch174

Hello, I have read your description. I can do your task and make calculator. I have an experience of 4 year. waiting for your reply. best regards

$10 USD ใน 3 วัน
(0 รีวิว)
0.0
developer15109

Hello sir/maam, I have been working as a professional java developer for last 3 years and have worked on more than 10 big to medium size applications. I have read the details carefully can build your project in minimum เพิ่มเติม

$15 USD ใน 1 วัน
(0 รีวิว)
0.0