Need urgent help in assignment of JAVA, any idea suggestion plz
-
Need urgent help in assignment of JAVA, any idea suggestion plz I need help in my JAVA assignment plz. kindly guide me any technique/idea to do the following. m not at advance level of programming. i already have the initial part of my assignment completed which is to make a simple command line calculator. this is the next part. The program should take function definitions and those definitions can be used in future expressions for eg: def add(x,y)=(x+y) >>> ok def inv(x)=1/x >>> ok inv(add(2,2)) >>> ans : 0.25 Also four additional commands: show; to prints all de?nitions on screen save flename; to save all defnitions in a fle load flename; to load all definitions from a fle delete funname; to delete the defnition corresponding to the function named funname
-
Need urgent help in assignment of JAVA, any idea suggestion plz I need help in my JAVA assignment plz. kindly guide me any technique/idea to do the following. m not at advance level of programming. i already have the initial part of my assignment completed which is to make a simple command line calculator. this is the next part. The program should take function definitions and those definitions can be used in future expressions for eg: def add(x,y)=(x+y) >>> ok def inv(x)=1/x >>> ok inv(add(2,2)) >>> ans : 0.25 Also four additional commands: show; to prints all de?nitions on screen save flename; to save all defnitions in a fle load flename; to load all definitions from a fle delete funname; to delete the defnition corresponding to the function named funname
-
Need urgent help in assignment of JAVA, any idea suggestion plz I need help in my JAVA assignment plz. kindly guide me any technique/idea to do the following. m not at advance level of programming. i already have the initial part of my assignment completed which is to make a simple command line calculator. this is the next part. The program should take function definitions and those definitions can be used in future expressions for eg: def add(x,y)=(x+y) >>> ok def inv(x)=1/x >>> ok inv(add(2,2)) >>> ans : 0.25 Also four additional commands: show; to prints all de?nitions on screen save flename; to save all defnitions in a fle load flename; to load all definitions from a fle delete funname; to delete the defnition corresponding to the function named funname
I'm a little confused. You say this is a Java assignment, but the example you have posted looks more like Python to me, not Java. Am I missing something?
-
I'm a little confused. You say this is a Java assignment, but the example you have posted looks more like Python to me, not Java. Am I missing something?
no, this is a JAVA assignment.
-
no, this is a JAVA assignment.
So the assignment is to rewrite the Python example in Java, is that right?
-
Need urgent help in assignment of JAVA, any idea suggestion plz I need help in my JAVA assignment plz. kindly guide me any technique/idea to do the following. m not at advance level of programming. i already have the initial part of my assignment completed which is to make a simple command line calculator. this is the next part. The program should take function definitions and those definitions can be used in future expressions for eg: def add(x,y)=(x+y) >>> ok def inv(x)=1/x >>> ok inv(add(2,2)) >>> ans : 0.25 Also four additional commands: show; to prints all de?nitions on screen save flename; to save all defnitions in a fle load flename; to load all definitions from a fle delete funname; to delete the defnition corresponding to the function named funname
aesthetic.crazy wrote:
I need help in my JAVA assignment plz. kindly guide me any technique/idea to do the following
You need the following parts 1. Something to read the input that the user types. 2. Something to parse each line into a command and OPTIONAL values since some commands do not have values. 3. Something to process EACH command. Write a method for each command. 4. AFTER you have the above parts and you have TESTED them, then you put them together to create the final program.
-
So the assignment is to rewrite the Python example in Java, is that right?
bro, no we dont know any python. but htis is our assignment in java only.
-
aesthetic.crazy wrote:
I need help in my JAVA assignment plz. kindly guide me any technique/idea to do the following
You need the following parts 1. Something to read the input that the user types. 2. Something to parse each line into a command and OPTIONAL values since some commands do not have values. 3. Something to process EACH command. Write a method for each command. 4. AFTER you have the above parts and you have TESTED them, then you put them together to create the final program.
what is processing in the third part? i need to know some idea about how to proceed further after parsing.
-
what is processing in the third part? i need to know some idea about how to proceed further after parsing.
Actually I misunderstood part of the assignment. It is quite a bit more complicated than I thought although what I said applies for the easy part. In terms of that you would create a method called something like Show() which would display the current defs. The hard part is the def command. You can do that with groovy in java. But it requires that you do java and groovy which is rather significant for a beginning assignment. Even the management of that without the actual call semantics is complicated.