Institute of Technical Education and Research
Siksha ‘O’ Anusandhan University
Minor Project-1 (2024)
Submitted by:Name: Anurag Majumdar
Sec: 23412N3
Roll No.: 30
Reg no.: 2341013076
Objective:- To create a member database and
retrieve records from it.
Description:First I have created 2 classes named as Date class and
Member class.
In Date class I have created a Date class constructor
to initialise the values of Day,month and year,
getters to get the values of day,month and year and
also a isBefore method to solve the given problem.
isBefore method will compare the dates to perform
the task .Return type is boolean so it will return true
or false.
And a method getMonthValue that will return the
values of months to make it easier for isBefore
method to compare the dates.
Below is the code for Date class:-
Now, Member class is created with a constructor to
set the values entered by the user .
Getters are created to get the values of the required
fields.
A display mehtod is created to display the values of
all fields.
Below is the code for Member class:-
Member and date class is created sucessfully.
Now, it’s the time to create a main class to insert all
the values through the user.
We have used Scanner class for user input and
Created an array member[] of member objects and
set the details.
Project is the name of our main class where we will
perform all the operations.
Code of main class:-
After inserting the values (User input) we will call
the display method from Member class to Display
all the values.
Tasks
Q1:-Display the records where the member’s JoinDate is earlier than 07Apr-2009
Code:-Here we will create a Date type object requiredDate to set the argument
date.Then we will call isBefore method to compare the dates.
Q2:- Display the records of all the senior members whose handicap
score is less than 12.
Code:--
.
Q3:-Display the records of all the female senior members who are part
of TeamB.
Code:--
The tasks and all coding part is completed.
Now it’s time for the output when we will insert 5
values from the user….
OUTPUT:-
Thank You