Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


player is good if the following conditions are satisfied:

He is either from “India”, “Japan” or “Korea”
He has a minimum of 3 years of experience
He has won at least 3 major tournaments, and one of them must be "World Championship Tournament".
He must know more than 10 techniques. (but see next question)
If he knows less than 10 techniques, then he must be a world champion.
His name contains at least 3 words. For example "Sachin Tendulkar" will not meet this condition.
Write a method:

boolean isGoodPlayer(String name, String country, int yearsExperience, String[] majorTournamentsWon, String[] techniques, boolean isWorldChampion)

name
country
yearsExperience
majorTournamentsWon
techniques
isWorldChampion



player is good if the following conditions are satisfied: He is either from “India”, “Japan..

Answer / ranjeet great

//I am not posting solution..You do your wprk by own..just use it..

import java.util.Scanner;

public class RanjeetGreatJavaClass
{

public static void main(String args[])
{
int age;
String firstname,middlename,lastname,degree;
boolean hasOwnClinic;

Scanner in = new Scanner(System.in);

System.out.println("Enter First Name :");
firstname = in.nextLine();

System.out.println("Enter Middle Name");
middlename = in.nextLine();

System.out.println("Enter Last Name");
lastname= in.nextLine();

System.out.println("Enter Degree");
degree= in.nextLine();

System.out.println("Enter Age");
age = in.nextInt();

System.out.println("Dr has his own Clinick ?");
Scanner scanner = new Scanner(System.in);
String answer = scanner.nextLine();
Boolean yn = (answer.equalsIgnoreCase("Y") ? true : false);

System.out.println(yn);
/*
if(scanner.nextBoolean()==true)
{
System.out.println("Dr has his own Clinik");
}
else
{
System.out.println("Dr don't have his own Clinik");
}
*/


System.out.print("How Many Patients :");
int totalPatients = in.nextInt();

String[] patientsname = new String [totalPatients];

//allows user to input Patientst names

for(int j = 0; j < patientsname.length;j++)
{
System.out.println(j);
System.out.print("Enter Patients Names:");
patientsname[j] = in.nextLine();
}


if (!degree.equalsIgnoreCase("MBBS"))
{
System.out.println("He must have at least 1000 Patients");
}



if (firstname.length()>5&& middlename.equalsIgnoreCase("kumar")&&age>25&&degree.equalsIgnoreCase("MBBS") )
{
for(int i = 0; i < patientsname.length;i++)
{
if(patientsname[i].equalsIgnoreCase("DEVESH")&& totalPatients>200);
{
System.out.println("He is a Good Doctor");
}


if(totalPatients>500&&yn.equals("true"))
{
System.out.println("He is a Good Doctor");
}

}

}
else
{
System.out.println("He is a Bad Doctor");
}

}
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

program for reversing a selected line word by word when multiple lines are given without using strrev

0 Answers   IBM,


What is typeof in c?

0 Answers  


i=20,k=0; for(j=1;j<i;j=1+4*(i/j)) { k+=j<10?4:3; } printf("%d", k);

8 Answers   HCL,


number of times a digit is present in a number

0 Answers  


Define recursion in c.

0 Answers  


Why can’t we compare structures?

0 Answers  


WRITE A PROGRAM TO FIND A REVERSE OF TWO NO

7 Answers  


how can i print "hello".please consider inverted commas as well.i want to print on console: "hello"

4 Answers   Wipro,


Name the language in which the compiler of "c" in written?

3 Answers   Bajaj,


1.Why do you call C is middle level language? 2.Why do you call C is userfriendly language.

2 Answers  


Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.

0 Answers  


what is the use of getch() function in C program.. difference b/w getch() and getche()??

29 Answers   HCL, IBM, Infosys, TCS, Wipro,


Categories