Question: Question: In a package named oop create a Scala class named Score with the following: . A constructor that takes an Int and stores it

Question: In a package named "oop" create a Scala class named Score" with the following: . A constructor that takes an Int and stores it in a member variable named score .A method named scoreGoal that takes no parameters and has return type Unit that increments the score by 1 A method named isWinner that takes a Score object as a parameter and returns a Boolean. The method returns true if this instances score is strictly greater than the inputs objects score
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
