Company: Salesforce Offcampus customer engineer_21march
Difficulty: medium
Implement a student registration and information retrieval system for a school using a simple class roster in Java. The system must assign an integer ID (enrollmentNumber) to each student, starting at 1 and incrementing by 1 for each new registration. The student's name is stored with the assigned enrollmentNumber. The Student class should implement: A constructor Student(String name) The method String toString() that returns the string '{enrollmentNumber}: {name}' The system should be able to register students and retrieve their information when requested. The locked stub code in the editor validates the implementation of the Student class. After each student is registered, the code stub requests and prints the student's information to test your code. Example Suppose the students registered, in order, are "Pat", "Sam", and "Chris". Output: 1: Pat 2: Sam 3: Chris Explanation: The first student to register is Pat ,so Pat is assigned 1 as the enrollment number by the portal. Sam is secon