Problem Statement :
---------------------->>>> Click Here :Subscribe to click <<<<<--------------------------
Create a class Team and make attributes :
int TeamID;
String TeamName;
String Location;
int TotalRunsByTeam;
int numberOfWicketsInTeam;
Write constructor and their 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 teamWithHighestRuns .
In this method you have to pass array object and one String input and one integer value that will return integer value . we needs to check every object and if objects which has the location matched to string value taken by user and numberOfWicketsInTeam should be more than integer value then find the team with highest runs for the above mentioned condition .
It returns the sum and if sum is greater than 0 then print it or if returns 0 then print "No any resort" .
---------------------->>>> Click Here :Subscribe to click <<<<<--------------------------
Input :
12
CSK
chennai
168
8
14
MI
Mumbai
188
4
17
DD
Chennai
144
9
18
RCB
Banglore
49
10
Chennai
5
Output :
168
---------------------->>>> Click Here :Subscribe to click <<<<<--------------------------
Code :
---------------------->>>> Click Here :Subscribe to click <<<<<--------------------------
Comments
Post a Comment