Practise Lab Questions
Practise Lab Questions
3. View Employees: Display all the employees in ascending order with respect to
date of joining.
Non-Functional Requirements:
1. The application must use appropriate collection to save all the required
information.
2. Application must throw appropriate exceptions whenever necessary.
3. Application must be created using appropriate layers.
-------------------------------------------------------------------
3. Write a program to enroll student in a course.
StudentName:String,
StudentId: int (Auto Increment),
studentAge: int,
CourseList: List<String>
constraints- User should be able to enroll a course if RegistrationDate is
Greater than currentdate.
duplicate entry is not allowed in course for user (Once per user
per course)
show course wise userlist.
Persist student information in bin file using serialization & restore it with de-
serialization
----------------------------
4.
Write a program to read binary file of volunteers atleast 10.
volunteer
volunteerId:int,
vName:String,
Hobbies:List<String>
isAvailable:boolean
DOB:Date or LocalDate
-------------------------
5.
Write a Program to add product in product list. and store them in a binary file
using serialization & restore it using de-serialization.
Product Id- int Auto increment.
Productname-String,
ProductPrice-double,
expiryDate-Date or LocalDate
Constraints:- (validation rules)
1. Prdoduct should be added if & only if its expiry date is
greater than current date.
2. Do not allow duplicate product(product with same name,and price
will not be allowed)
In Tester application :
Retieve the products into a suitable collection when you start the
application.
Options :
1. Display product list.
2. Add new product (check for duplication as per the rule)
3. Remove product by name.
3. Exit (save suitable collection of products in bin file using
serialization)
6.
Write a program to Add Players in IPL team and store then in a binary file using
serialization & retrieve using de-serilaization.
PlayerName-String
PlayerId- Unique
Ranking- int.
Points- double
Constraints-
Each Player's ranking should be between 1-5 while adding player in
a team (suitable collection of players)
duplicate entry of player with same name & points is not allowed.
minimum 5 players and Maximum 7 players is allowed.
From Tester application
1. User Should be able to Populate IPL Players in a team with player details.