Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners coding for given question
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


manish kumar
coding for given question
0 Answer(s)      2 years and 4 months ago
Posted in : Java Beginners


Board of Control for Cricket in India wants to award all the best bowlers, based on their performances in a year. A Bowler is called the Best, if the average wickets taken by him during the year is 5 and above. The number of matches played is calculated by the number of digits provided against a player. Assume that no bowler has taken 10 wickets in a match. BCCI has assigned you task to write a program that calculates the count of best bowlers among the given lot. Input/Output Specs Input Specs Your program must read one arguments ( string1) where string1 is a string[] that provides you the input details. String1 is a string array that provides you each player details.

Sample Input: String1 = {‚??2210011‚??, ‚??1115422363‚??, ‚??4645637468‚??, ‚??023013‚??, ‚??1323402022‚??} Here array represents the number of player information that is provided to you. Considering the 5 players as V. Kumar, R. Ashwin, P. Ojha, V. Aaron, U. Yadav Vinay Kumar has played 7 matches and the performances are 2,2,1,0,0,1,1. The average wickets taken in those 7 matches are 1 wicket per match. Since the criteria are 5, his is not included in the Best Bowlers list. For Ashwin, the number of matches played is 10 and his performances are 1,1,1,5,4,2,2,3,6,3. The average wickets taken per match are 2.8. Since the critera are 5, his is also not included in the list. Similarly for P. Ojha, average wickets taken based on the given details are 5.3. As he fits the criteria of 5 and above, he is included in the Best Bowlers list. For V. Aaron, he doesn‚??t fit the criteria because the average wickets taken by him are only 1.5 For U. Yadav, he also doesn‚??t fit the criteria because the average wickets taken by him are only 1.9 So the total number bowlers who satisfied the criteria for Best Bowler is only one (P.Ojha). So , The output is 1

Coding Specs

class CricketBoard
{
//method to find the best bowler.
public static int findBestBowlers(String [] string1)
{
int output1 = 0;
// Your code here
return output1;
}
public static void main(String [] args)
{
String [] string1 = new String[5];
//Code here for user input in string1
int result = findBestBowlers( string1);
System.out.println(‚??No of Best Bowlers : ‚??+result);
}
}

Advertisement
View Answers

Related Tutorials/Questions & Answers:
coding for given question
coding for given question  Board of Control for Cricket in India... of best bowlers among the given lot. Input/Output Specs Input Specs Your program.... Ojha, average wickets taken based on the given details are 5.3. As he fits
how i want to create a coding by this question?
how i want to create a coding by this question?  Design and write a class named Person and its two subclasses named Student and Employee. Make Lecturer and Admin subclasses of Employee. A person has a name, address, phone number
Advertisements
hi... pls give me the example of java coding fo following question
hi... pls give me the example of java coding fo following question  example java coding that reads in the radius and length of cylinder and computes volume. formula: Area = radius * radius * PI Volume = area * length
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a program that displays the following table (note that 1 mile is 1.609 kilometers). Miles Kilometers
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a program that prompts the user to enter the number of students and each student‚??s name and score, and finally displays the name of the students
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment value using the following formula
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Suppose that the tuition for a university is RM10,000 this year and increases 5% every year. Write a program that computes the tuition in ten years and the total cost
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a function called ChangeToNext that take in an uppercase character parameter ch. The function returns the next uppercase character if ch is between 'A' and 'Y
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Write a class that contains the following two methods: /* converts from inches to centimeters */ Public static double inchToCentimeter(double in) /* converts from
hi... pls give me the example of java coding for following question
hi... pls give me the example of java coding for following question   Write a program that computes loan payments. The loan can be a car loan, a student loan, or a home mortgage loan. The program lets the user enter the interest
hi... pls give me the example of java coding fo following question
hi... pls give me the example of java coding fo following question  Write a java program that reads the following information and prints a payroll statement: Employee‚??s name (e.g: Sam) Number of hours worked in a week (e.g: 10
hi.. please give me a java coding for the following question
hi.. please give me a java coding for the following question  Body Mass Index(BMI) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters
coding
coding  I need the logout coding. can you please help me.   Please visit the following links: http://www.roseindia.net/quickguide/tomcat/Logout.shtml http://www.roseindia.net/jsp/loginstatus.shtml
question
question   sir plz tell me what should i give in title box. just i want java program for the question typed in this area
question
question   sir plz tell me what should i give in title box. just i want java program for the question typed in this area
Question
Question   When there is an exception in my program how java runtime system handles
question
question  dear sir/madam my question is how to compare two text format in java..we are java beginners..so we need the complete source code for above mentioned question...we have to compare each and every word
question
question  please give me the relevant modules and details to start java coding for "Deriving Concept-based User Profiles from Search Engine Logs" it's very urgent
coding for project
coding for project  hai how to write jsp coding for project smart accessories ...... that s to navigate to another page when you click on a tag
program coding
program coding  how to rearrange the array a[1]. . a[n] even elements and odd elements? please give the example coding program.please provide the coding for this problem
question
question  Dear sir i had some typing mistake at previous question so its my humble request to let me know the steps to start the tomcat6 under the tomcat directory
Question
Question  which url address should be given in web.xml
coding for chart
coding for chart  I want to convert a character into binary then convert it into its diagram in form of digital electrical signals.How can I do java coding for this diagram
Java Coding
Java Coding  Hello, Can u please tel me how to improve my coding techniques.I am feeling difficulty with coding but I am perfect with my theory part
coding of button
coding of button  What is code of fetching the value of button in a textbox using javascript
Question
Question  Sir, give me a java program to count the number of tokens , given a string and a seperator
Question
,the questions like find out the result of given code(to find out result from the given code). please also send me the answers with the questions
program coding
program coding  how to rearrange the array a[1]. . a[n] even elements and odd elements? please give the example coding program
Question
find out the result of given code(to find out result from the given code
Question
of given code(to find out result from the given code). please also send me
question
question  i have a project for search engine .i have a starting trouble , from where do i start project ,please help me.when i am given a key word to search ,which must return title,summary and url and i want to capture
Advertisements
 

 

 

DMCA.com