Question: JAVA THEORY QUESTION RELATED TO ABSTRACTION 1a) Imagine you are building a poker game. Explain why for the poker game you should have an abstract
JAVA THEORY QUESTION RELATED TO ABSTRACTION
1a) Imagine you are building a poker game. Explain why for the poker game you should have an abstract Card class and multiple concrete subclasses for hearts, diamonds, clubs, and spades.
Answer must thoroughly explain the benefit of doing so.
b)Imagine there is a website called FunFunServer.com. Each user on FunFunServer.com is modelled with a User class. On FunFunServer.com each user is given different roles. These roles enable the user to be given special perks such as if the user has the "king" role they are able to see premium content which is hidden to those users who only have the "prince" role. Explain why having each role as a subclass of the User class is a bad idea.
Answer must thoroughly explain the disadvantages of doing so.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
