{
        $this->firstName = $fname;
        $this->lastName = $lname;
        $this->phone = $phone;
        $this->score = $score;
    }
    function calculate()
    {
        switch (intval($this->score / 15)) {
            case 3:
                return 'B';
            case 4:
                return 'A';
            case 5:
                return 'E';
            case 6:
                return 'O';
            default:
                return intval($this->score / 10) === 4 ? 'B' : 'D';
        }
    }
}
$firstName = fgets(STDIN);
$lastName = fgets(STDIN);
$phone = intval(fgets(STDIN));
$score = intval(fgets(STDIN));
$stu;
settype($stu, "Student");
$stu = new Grade($firstName, $lastName, $phone, $score);
$stu->display();
print "\nGrade: " . $stu->calculate();