0% found this document useful (0 votes)
5 views3 pages

Advanced Java Kara d

The document outlines the guidelines for a lab examination in Web-Based Java Programming at Sunbeam Institute. Students are required to create a Spring Boot REST application for CRUD operations on 'Vehicle' and 'User' resources, adhering to specific validation and response code requirements. Evaluation criteria include implementation of various functionalities, payload validations, and error handling, with a total of 40 marks available.

Uploaded by

Abhinav Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Advanced Java Kara d

The document outlines the guidelines for a lab examination in Web-Based Java Programming at Sunbeam Institute. Students are required to create a Spring Boot REST application for CRUD operations on 'Vehicle' and 'User' resources, adhering to specific validation and response code requirements. Evaluation criteria include implementation of various functionalities, payload validations, and error handling, with a total of 40 marks available.

Uploaded by

Abhinav Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

A

SUNBEAM INSTITUTE OF INFORMATION


TECHNOLOGY
KARAD
Module End Lab Examination – Web-Based Java Programming

Course Name : PG-DAC Batch : Mar 2024


Module Name: Web-Based Java Programming Date : 28/06/2024
Max. Marks : 40 Duration : 2 : 00 Hours

Instructions :
1. Create new workspace (Folder) by the name AdvJava_12 digit PRN.
2. Create new project and save it in above workspace.
3. Do not refer any files from your system.
4. After evaluation compress/zip your folder and file (AdvJava_12 digit PRN) and upload it
on EMIS.

Evaluation of Lab Exam is based on the following criteria :


Self-Declaration for Paper Code – A
Sr. Tick Mark Max Marks by
Points to cover
No. by student Marks Evaluator
1. Implementation of Add Vehicle 3
Implementation of Delete Vehicle by given User
2. Name
3
Implementation of Get Vehicle by given User
3. Name
3
Implementation for Get Vehicle name and User
4. name for given purchase date
6

5. Payload Validations 5
6. Proper response codes for GET & POST 5
7. Error Handling 5
8. Service and Repository and Entity layers 10

Total:40 ___________

______________________ ________________________
Signature of Student Signature of Evaluator
A
Lab Exam Question:

Q1) Write a Spring Boot REST application which will provide following CRUD operations for
“Vehicle” and “User” resource running in Automobile Company.

1) Add new Vehicle.


2) Delete vehicle records for given User. (need to provide User name)
3) Fetch all Vehicle for given User. (need to provide User name)
4) For a given date, get the list of sold vehicle name and their User name. If no vehicle
sold for given date return proper response message.

Vehicle has the following attributes:


1) Id (unique identifier for each Vehicle, auto generated, starts from 1)
2) Vname (Cannot be Blank, Example: Splendor, Amaze, Pulsar, etc.)
3) Company (Enum, Example: Hero, Honda, Bajaj, etc.)
4) Vnumber (Cannot be Blank, Example: MH09AB1111, MH10CD2222, MHEF3333, etc.)
5) Vtype (Cannot be Blank, Example: bike, sedan, cruiser, etc.)
6) Uid (User ID, FK)
7) purchaseDate(Cannot be Blank)

User has the following attributes: (Enter Sample Data in Database)


1) Uid (unique identifier for each User)
2) Uname (Cannot be Blank)
3) Email (Cannot be Blank)
4) Password (Cannot be blank, min 6 characters)
5) City (Cannot be Blank)
6) Contact_No (Cannot be blank, min 10 digit)
7) Birth_Date(Cannot be Blank)

• Use MySQL Relational Database to save resource.

• Create Payload will have fields like – Vname, Company, Vnumber, Vtype, Uid,
puchaseDate

• “Id (auto generated)” will be populated by the Service

(continued on next page)


A
• There should be Validation on Create Payload. For example:

1) Vname, Vtype should not be blank.


2) Vnumber should not be blank and length must be 10
3) If User does not exist then Vehicle must not be registered under that user (display
relevant message).
4) None of the fields in Vehicle table are Nullable.

• Rest URL should be named as per REST best practices.

• Response codes should be as per REST guidelines (201 for resource creation, 404 for not
found, 200 for ok)

• Error handling in case of failures. (Optional : Global Exception Handling)

Note:- You have to call all API's on Postman or Swagger

You might also like