Problem Statement :
Create a class Universities and make attributes :
int UniversitiesID;
String UniversitiesName;
String Location;
double rating;
boolean InnovativeLab;
Write getter and setter of all the attributes and make the attributes private .
Write a Solution class and a main method inside it. Inside main method , create a method countNumberOfInnovativeLabs .
in this method you have to pass array object and two inputs one is string and one is double value. and we needs to check that is location of each object must be equal to string value and rating must be greater that the double value that will be passed in method . and also check how many labs are present that accepting above condition . It returns the count of such labs and print it and if no any labs , then returns 0 and print "No any Labs" .
Input :
Code :
Comments
Post a Comment