Question: INTRO TO JAVA: Write a class City. The constructor takes the name as a String parameter. You provide the methods: public String getName ) returns

INTRO TO JAVA:

INTRO TO JAVA: Write a class City. The constructor takes the name

Write a class City. The constructor takes the name as a String parameter. You provide the methods: public String getName ) returns the name of this City * public boolean moreVowels ) returns true if the City name has more vowels than other characters. Otherwise it returns false. The vowels are "aeiouAEIOU". (One way to get the number of other characters is by subtracting the number of vowels from the total number of characters the length) public boolean isInAsia () returns true if the City name is "Beijing", "New Delhi", or "Tokyo". Otherwise it returns false. Ignore case. Tokyo, tokyo, and TOKYO are all in Asia

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!