This one... I have NO CLUE how to even start. I hate the teacher because he doesn't want us to ask any questions to him so I'm back here requesting help.
Design a class hierarchy that allows to determine the type of result of an expression following the precedence and combination rules of the C language. The expression is to be supplied as a String using, instead of variables, the type corresponding to each one of them.
For example, assuming the following group of declarations and expression:
Question
Conciente
This one... I have NO CLUE how to even start. I hate the teacher because he doesn't want us to ask any questions to him so I'm back here requesting help.
Design a class hierarchy that allows to determine the type of result of an expression following the precedence and combination rules of the C language. The expression is to be supplied as a String using, instead of variables, the type corresponding to each one of them.
For example, assuming the following group of declarations and expression:
int a;
float b;
char c;
b= a / c + (c + 25)
the corresponding String would be supplied as:
float = int / char + (char + int)
resulting in a float.
--------------------------
*lost*
Link to comment
Share on other sites
7 answers to this question
Recommended Posts