Skip to main content
Code Review

Return to Answer

Commonmark migration
Source Link

##OOP

OOP

  1. Let's start with : private static bool checkOperator(Object operatorChar). You shouldn't use Object if you expect a char. If you want a char , demand a char. Also, checkOperator doesn't really mean anything. Your method is used to check if a character is an operator so, I would rename it isOperator.

    public char Operand { get; set; } // operator sometimes; public Node Left; public Node Right;

  2. You sometimes use { get; set}, sometimes not. Use it all. the. time. Fine, it's not always necessary, but it doesn't cost more than not using it and, especially in interview questions regarding OOP, you're better to encapsulate than not.

##Comments

Comments

public char Operand { get; set; } // operator sometimes;

Okay but, when is it an operator, when is it not? Why is it named operand if it's sometimes an operator. This comment introduces much more confusion that it clarifies things. This is mostly a symptom of a problem with the name of your property.

Your XML comments aren't what they should be. They should be used for documentation, not space/time complexity or history.

##Constraints

Constraints

Your code doesn't support :

  1. Numbers higher than 9
  2. ((1)+2)

##OOP

  1. Let's start with : private static bool checkOperator(Object operatorChar). You shouldn't use Object if you expect a char. If you want a char , demand a char. Also, checkOperator doesn't really mean anything. Your method is used to check if a character is an operator so, I would rename it isOperator.

    public char Operand { get; set; } // operator sometimes; public Node Left; public Node Right;

  2. You sometimes use { get; set}, sometimes not. Use it all. the. time. Fine, it's not always necessary, but it doesn't cost more than not using it and, especially in interview questions regarding OOP, you're better to encapsulate than not.

##Comments

public char Operand { get; set; } // operator sometimes;

Okay but, when is it an operator, when is it not? Why is it named operand if it's sometimes an operator. This comment introduces much more confusion that it clarifies things. This is mostly a symptom of a problem with the name of your property.

Your XML comments aren't what they should be. They should be used for documentation, not space/time complexity or history.

##Constraints

Your code doesn't support :

  1. Numbers higher than 9
  2. ((1)+2)

OOP

  1. Let's start with : private static bool checkOperator(Object operatorChar). You shouldn't use Object if you expect a char. If you want a char , demand a char. Also, checkOperator doesn't really mean anything. Your method is used to check if a character is an operator so, I would rename it isOperator.

    public char Operand { get; set; } // operator sometimes; public Node Left; public Node Right;

  2. You sometimes use { get; set}, sometimes not. Use it all. the. time. Fine, it's not always necessary, but it doesn't cost more than not using it and, especially in interview questions regarding OOP, you're better to encapsulate than not.

Comments

public char Operand { get; set; } // operator sometimes;

Okay but, when is it an operator, when is it not? Why is it named operand if it's sometimes an operator. This comment introduces much more confusion that it clarifies things. This is mostly a symptom of a problem with the name of your property.

Your XML comments aren't what they should be. They should be used for documentation, not space/time complexity or history.

Constraints

Your code doesn't support :

  1. Numbers higher than 9
  2. ((1)+2)
deleted 15 characters in body
Source Link
IEatBagels
  • 12.6k
  • 3
  • 48
  • 99

##OOP

  1. Let's start with : private static bool checkOperator(Object operatorChar). You shouldn't use Object if you expect a char. If you want a char , demand a char. Also, checkOperator doesn't really mean anything. Your method is used to check if a character is an operator so, I would rename it isOperator.

    public char Operand { get; set; } // operator sometimes; public Node Left; public Node Right;

  2. You sometimes use { get; set}, sometimes not. Use it all. the. time. Fine, it's not always necessary, but it doesn't cost more than not using it and, especially in interview questions regarding OOP, you're better to encapsulate than not.

##Comments

public char Operand { get; set; } // operator sometimes;

Okay but, when is it an operator, when is it not? Why is it named operand if it's sometimes an operator. This comment introduces much more confusion that it clarifies things. This is mostly a symptom of a problem with the name of your property.

Your XML comments aren't what they should be. They should be used for documentation, not space/time complexity or history.

##Constraints

Your code doesn't support :

  1. Numbers higher than 9
  2. ((1)+2)
  3. List item

##OOP

  1. Let's start with : private static bool checkOperator(Object operatorChar). You shouldn't use Object if you expect a char. If you want a char , demand a char. Also, checkOperator doesn't really mean anything. Your method is used to check if a character is an operator so, I would rename it isOperator.

    public char Operand { get; set; } // operator sometimes; public Node Left; public Node Right;

  2. You sometimes use { get; set}, sometimes not. Use it all. the. time. Fine, it's not always necessary, but it doesn't cost more than not using it and, especially in interview questions regarding OOP, you're better to encapsulate than not.

##Comments

public char Operand { get; set; } // operator sometimes;

Okay but, when is it an operator, when is it not? Why is it named operand if it's sometimes an operator. This comment introduces much more confusion that it clarifies things. This is mostly a symptom of a problem with the name of your property.

Your XML comments aren't what they should be. They should be used for documentation, not space/time complexity or history.

##Constraints

Your code doesn't support :

  1. Numbers higher than 9
  2. ((1)+2)
  3. List item

##OOP

  1. Let's start with : private static bool checkOperator(Object operatorChar). You shouldn't use Object if you expect a char. If you want a char , demand a char. Also, checkOperator doesn't really mean anything. Your method is used to check if a character is an operator so, I would rename it isOperator.

    public char Operand { get; set; } // operator sometimes; public Node Left; public Node Right;

  2. You sometimes use { get; set}, sometimes not. Use it all. the. time. Fine, it's not always necessary, but it doesn't cost more than not using it and, especially in interview questions regarding OOP, you're better to encapsulate than not.

##Comments

public char Operand { get; set; } // operator sometimes;

Okay but, when is it an operator, when is it not? Why is it named operand if it's sometimes an operator. This comment introduces much more confusion that it clarifies things. This is mostly a symptom of a problem with the name of your property.

Your XML comments aren't what they should be. They should be used for documentation, not space/time complexity or history.

##Constraints

Your code doesn't support :

  1. Numbers higher than 9
  2. ((1)+2)
Source Link
IEatBagels
  • 12.6k
  • 3
  • 48
  • 99

##OOP

  1. Let's start with : private static bool checkOperator(Object operatorChar). You shouldn't use Object if you expect a char. If you want a char , demand a char. Also, checkOperator doesn't really mean anything. Your method is used to check if a character is an operator so, I would rename it isOperator.

    public char Operand { get; set; } // operator sometimes; public Node Left; public Node Right;

  2. You sometimes use { get; set}, sometimes not. Use it all. the. time. Fine, it's not always necessary, but it doesn't cost more than not using it and, especially in interview questions regarding OOP, you're better to encapsulate than not.

##Comments

public char Operand { get; set; } // operator sometimes;

Okay but, when is it an operator, when is it not? Why is it named operand if it's sometimes an operator. This comment introduces much more confusion that it clarifies things. This is mostly a symptom of a problem with the name of your property.

Your XML comments aren't what they should be. They should be used for documentation, not space/time complexity or history.

##Constraints

Your code doesn't support :

  1. Numbers higher than 9
  2. ((1)+2)
  3. List item
lang-cs

AltStyle によって変換されたページ (->オリジナル) /