Question: Question [10 points]: In a package named oop create a Scala class named Score with the following: A constructor that takes an Int and stores

Question [10 points]: 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, false otherwise Testing [10 points]: In a package named "tests" create a Scala class named "TestScore" as a test suite that tests all the functionality listed above

what is the answer to this one?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!