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:

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
Get step-by-step solutions from verified subject matter experts
