Implement a small domain model in Java by adding a new class named Course in the package app (placed at /app/Course.java). The class should represent a course with two attributes: name (String) and credit (int). The implementation must be immutable and robust.
Requirements:
Class location: /app/Course.java with package app.
Fields: private final String name; private final int credit.
Constructor: public Course(String name, int credit) that initializes both fields.
Validation:
name must be non-null and not blank (trimmed length > 0); otherwise throw IllegalArgumentException with a clear message.
credit must be between 0 and 5 inclusive; otherwise throw IllegalArgumentException with a clear message.
Accessors:
public String getName()
public int getCredit()
Immutability: no setters; fields are final.
Equality and hashing:
Override public boolean equals(Object o) and public int hashCode() so two Course instances are equal if both name and credit are equal.
String representation:
Override public String toString() to return: "Course{name='NAME', credit=CREDIT}"
Documentation: Include minimal Javadoc on the class and public methods.
Compatibility: The class should compile and be usable by existing tests (even though the provided tests don’t reference Course directly).