Access to private members

Report a typo

We have a class called Website. It already has a companion object that is hidden:

object Website:
  private val adminPassword: String = 
    // the logic of getting the password from the configuration here

Implement the authorizeAdmin method, which will check whether the passed password matches what is stored in the configuration.

Sample Input 1:

secretPassword
12345678

Sample Output 1:

false
Write a program in Scala 3
class Website:
def authorizeAdmin(password: String): Boolean = ???
___

Create a free account to access the full topic