Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java Code. One of the football fans heard that one of the most outstanding players, Mesut Ozil, has decided to play in Turkey.

Write a Java Code. One of the football fans heard that one of the most outstanding players, Mesut Ozil, has decided to play in Turkey. That guy wanted to go to the airport to welcome him. The fan wanted to find out how many football fans will be there. To do that, it is needed to have a new computer program, and you should implement it. The fan realized that a few factors affect the decision to go to the airport or not.

The rules are given below:

Adanaspor, Besiktas, and Fenerbahce fans are willing to go to the airport.

If the age is lower than 18 or higher than 55, they prefer to stay at home.

If the distance to the airport is further than 10 km and closer than 50 km, they want to go to see him.

When the weather condition is starting with "S", fans want to go to the airport.

Your program should read all the inputs, supported team, age, distance, and weather condition, in this order. Supported teams can only be Adanaspor, Besiktas, Fenerbahce, Galatasaray, and Trabzonspor Weather condition can only be Clear, Cloudy, Snowy, Sunny, and Rainy

You will be getting several fans, until "Done" is given, and your program should count how many people are eligible to go to the airport. One line output is going to show that number.

Input Format

Your program should read all the inputs, supported team, age, distance, and weather condition, in this order.

You will be getting several fans, until "Done" is given, and your program should count how many people are eligible to go to the airport.

Constraints

Supported teams can only be Adanaspor, Besiktas, Fenerbahce, Galatasaray, and Trabzonspor Weather condition can only be Clear, Cloudy, Snowy, Sunny, and Rainy

Output Format

One line output is going to show that number.

Sample Input 0

Fenerbahce 40 15 Sunny Adanaspor 60 45 Cloudy Trabzonspor 42 23 Sunny Besiktas 43 9 Rainy Done 

Sample Output 0

1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions