IPA4
IPA4
id-int
name -String
contactNo-int
address-String
pinCode-int
Write the getters and setters and parametrized constructor in the above
1.findCollegeWithMaximumPincode
2.searchCollegeByAddress
findCollegeWithMaximumPincode method:
This method will take array of the College objects and return the
College object having maximum pincode if found else return null if not
found.
for this method ,main method will print College object with maximum
pincode if the returned value is not null.if the returned value is null ,
then the main method will print "No college found with mentioned attribute".
searchCollegeByAddress method:
This method will take array of College objects as input and address as
input and return College object having the mentioned address if found
else return null if not found.
for this method main method will print College object details as it is ,
if the returned value is not null.if the returned value is null then ,
main method will print "No college found with mentioned attribute".
***************************************************************************
input 1:
4
109
ACT
2500256
mumbai
695001
107
MCE
2500254
malapuram
612354
113
CTE
2500252
chennai
623145
102
SCT
2500255
AP
523641
AP
OUTPUT1:
id-109
name-ACT
contactNo-2500256
address-mumbai
pincode-695001
id-102
name-SCT
contactNo-2500255
address-AP
pincode-523641
INPUT2:
4
111
MJT
2500251
Calicut
401235
105
MET
2500256
kochi
668745
115
IIT
2500262
banglore
569874
110
ACT
2500263
delhi
687945
delhi
output2:
id-110
name-ACT
contactNo-2500263
address-delhi
pincode-687945
id-110
name-ACT
contactNo-2500263
address-delhi
pincode-687945