CST 338 Week 4
Review of Nettra’s Code Overall feedback, code ran with no errors. Feedback for code is to add comments where the constructors and specific variables and what they do are, this is probably not needed, but the only thing I could see that could be changed. Great work! Encapsulation The instance variables are private. This matters because it ensures the variables are not accessed from an unknown class. Getters and setters exist where appropriate in the code, such as, getRank and getSuit. Both are needed in order for the code to fully run and needed for follow-on parts of Project 1. Constructors The constructor validates its inputs in the code. If someone passes an invalid suit or value the code will throw an error. There is no default constructor. No there doesn’t need to be one for Card or Deck since there are already defined constructors. Readability and Style The comments and the variable names and method names make it easy to follow the logic without running the cod...