java急救 聊天系统中如何实现服务器端转发数据

来源:百度知道 编辑:UC知道 时间:2024/05/31 02:35:48
我想实现一套聊天程序 基于java的 但在服务器端将一个客户端的聊天内容转发到另一个客户端时卡了壳 请大家帮我想想该怎么实现啊 由于时间有限 现在非常着急 在这里先谢谢大家了

Problem to solve:
Write a stack-based Calculator program in Java to support the following operators for integer and floating point data: addition, multiplication, division, subtraction; modulo and square-root. Also implement a print operator that prints out the entire stack and a pop operator that discards the top element on the stack. Your program should be in pure Java, and can use any of the standard Java Development Kit class library elements. Your operand stack should support mixed mode arithmetic and should promote integers to floating point numbers where appropriate. Implement appropriate exception handling to cope with malformed input from the user.

Specification:
Your program should accept textual input like:

144.0 sqrt
12.0
10 20 add
30
2 3 4 add mult
14
print
12
30
14
pop
pop
2.0
mult
24.0

Where the bolded lines are representative of your pro