Skip to main content
Zionmoose's user avatar
Zionmoose's user avatar
Zionmoose's user avatar
Zionmoose
  • Member for 11 years, 9 months
  • Last seen more than 7 years ago
  • Austin, TX
awarded
awarded
awarded
awarded
comment
Abstract Pet class
Excellent advise and good refactoring of the stuff you did. I've learned a lot!
accepted
comment
Abstract Pet class
Good points. Haven't come to enumerators yet which is why I did it the way I did. Thanks!
comment
Abstract Pet class
I definitely see where you are coming from, but if I'm not mistaken, your solution appears to not meet the parameters of what the homework was designed to be. Three of the methods in the base class Pet had to be abstract so that you could define the functionality. The idea, even if it is more complicated then it needs to be, is to just get us to understand how things like abstract, override and virtual work.
asked
Loading…
comment
C# product inventory. How would you refactor this?
That's exactly what I had done. Thanks! Love google.
comment
C# product inventory. How would you refactor this?
Also even though you say the default value is 0, there is a compiler error that requires you to initialize it.
awarded
comment
C# product inventory. How would you refactor this?
This does not seem to work. Correct me if I am wrong here, but your ValidChoice(Choices choice) method declaration does not permit you to pass in an int or string for the comparison. This is due to ints and strings not being assignable to the Choices enum. So I am getting an error using your method because when I try to instantiate the ValidChoices(choice) method and assign it to invalidChoice, I get a compiler error that says you cannot assign an int to type Choices.
awarded
comment
C# product inventory. How would you refactor this?
That does look convenient, but for the sake of trying to understand the basics, I am trying to conform to the standards they asked us to complete the project with.
awarded
awarded
comment
C# product inventory. How would you refactor this?
Excellent! I will give it a shot. Much appreciated!
comment
C# product inventory. How would you refactor this?
Do you think it is possible to keep every method below 25 lines with only basic knowledge and not any of the powerful shorthand stuff?