0% found this document useful (0 votes)
6 views

Springboot 2

Uploaded by

Khan Abdullah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Springboot 2

Uploaded by

Khan Abdullah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment

There is a school named XYZ and the school has multiple classes and each class has a unique
class name and students. Each student has a unique rollno, name, date of birth and subjects.
(only room no should be unique.)

Implement the following Rest APIs using Spring Boot framework

-> Add an endpoint to fetch all the class details.


-> Add an endpoint to add the class.
-> Add an endpoint to delete the class.
-> Add an endpoint to fetch the class by class name.
-> Add an endpoint to add the student to a particular class.
-> Add an endpoint to update the student details studying in a particular class.
-> Add an endpoint to delete the student.
-> Add an endpoint to fetch the student details and count studying in a particular class.
-> Add an endpoint to fetch all the students associated with a particular subject. (For example :
Students having Physics as a subject. If the subject is given as null. Then it should fetch all the
students of the school.)
-> Add an endpoint to fetch all the students whose birth year is 2000.

Note :

1) Make sure to add a global exceptionhandler.


2) Make sure to add proper validation. (For example date of birth has DD-MM-YYYY format
& class name should have pattern like C1(C letter followed by digit)) etc).
3) Pls use collections for storing classes and students.

Following scenario should also be met.


1) If we are fetching an non-existing class or student, then an exception should be thrown
from the application.
2) If we are sending invalid date of birth format, then an exception should be thrown from
the application.
3) If we are trying to update a non-existing class or student, then an exception should be
thrown from the application.

You might also like