IPA23
IPA23
institutionId - int
institutionName - String
noOfStudentsPlaced - int
noOfStudentsCleared- int
location - String
grade - String
FindNumClearancedByLoc method:
----------------------------------------------
This method will take two input parameters - array of Institution objects and
string parameter location.
The method will return the sum of the noOfStudentsCleared attribute from
institution objects for the location passed as
parameter. If no institution with the given location is present in the array of
institution objects, then the method
should return 0.
UpdateInstitutionGrade method:
-----------------------------------------------
This method will take a String parameter institutionName, along with the array of
Institution objects.
The method will return the institution object, if the input String parameter
matches with the institutionName attribute of the
institution object. Before returning the object, the grade should be arrived based
on the rating calculation mentioned below.
This grade value should be assigned to the object.If any of the above conditions
are not met, then the method should return
null.
Rating=(noOfStudentsPlaced * 100)/noOfStudentsCleared
If the rating >= 80 , then grade should be 'A'.
Else, then grade should be 'B'
**Note:**
--------------------------------------------
No institution object would have the same value for institutionName attribute.
All institution object would have the noOfStudentsPlaced value lesser than
noOfStudentsCleared value.
All the searches should be case insensitive.
The above mentioned static methods should be called from the main method.
For FindNumClearancedByLoc method - The main method should print the noOfClearance
as it is, if the returned value is
greater than 0, or it should print "There are no cleared students in this
particular location".
Before calling these static methods in main, use Scanner object to read the values
of four Phone objects referring attributes
in the above mentioned attribute sequence (except grade attribute). Next, read the
value for location and institutionName.
Input
-------------------------------------------
111
Amrita
5000
10000
Chennai
222
Karunya
16000
20000
Coimbatore
333
AppleTech
10000
12000
Chennai
444
Aruna
6000
10000
Vellore
Chennai
Karunya
Output
----------------------------------------
22000
Karunya::A
Starter Code
========================================
import java.util.Scanner
public class Solution
{