How to take in code from user?

牧云@^-^@ 提交于 2019-12-25 07:16:50

问题


See I want to do this Equation Graph Plotter in Java using Netbeans. I am using Graphics 2D to plot the idividual Points. My Question is is it possible to take in an equation from the user and put it in the code ??

Example : float y=(float) ( Math.sin(x/100)*100);

Suppose the user wants to see a cos graph is it possible to type in Math.cos(x/100)*100 and equate it to y ?

If not how do I solve this ?? Any Alternate methods Appreciated

来源:https://stackoverflow.com/questions/15881469/how-to-take-in-code-from-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!