爪哇巴比伦数字表示法
我是java新手,在接下来的两周内将完成以下任务。任何关于如何开始的建议都将不胜感激:
Write a Java class whose instances represent Babylonian numbers. Your class should provide at least the following methods:
- 以巴比伦形式表示的数字作为输入(如
String
或"34,45,2"
等)的构造函数 - 将当前巴比伦数字的值作为整数返回的方法李>
- 将巴比伦数字转换为字符串形式的方法李>
- 将两个巴比伦数字相加生成新巴比伦数字的方法李>
- 一种从当前巴比伦数字中减去经过的巴比伦数字以生成新巴比伦数字的方法李>
If there are restrictions on the magnitude of the numbers that can be represented by your class, say what those restrictions are.
# 1 楼答案
在下面,您将找到一组可能对您有所帮助的方法: