1. Implement a method named words that accepts a String array named beta. The method will return the number of Strings that start with the letter ‘T’.
2. Implement a method named tokens that accepts a String array named alpha. The method will return an integer array named count that holds the number of words in the String of the corresponding index. All words in the string are delimited by a space.
3. Implement a method named corners that accepts a 2-dimentional array of chars name twodee. The method will insert an ’X’ in the 4 corners of the array.
4. Given a class named Container that has one integer attribute named size, and one String attribute named color. It also has a method named getVolume. Create a child class named Bowl and a child class named Cube. The size attribute will refer to the diameter of the bowl and to the side of the cube. Add any attributes or methods to the child classes that are needed. Both child classes should at-least have methods as shown below:
Constructor with no parameters Constructor with parameters
getSize() getVolume() getColor() equals() toString()
5. Given a class named Triangle that has 3 attributes named side1, side2, and side3. Create a child class named RightTriangle. The child class should have at least the following methods:
Constructor with no parameters Constructor with parameters (only 2 are needed)
getSideA() getSideB() getHyp() getArea() getPerimeter() equals() toString
6. Given a file named cities.txt, where each line contains a city, a state, and a budget. The program will ask the user what the budget funds are from the state (I used 125000). It will then read in from the file and calculate the budget surplus or shortfall. It will write out to a file named budget.txt the name of each city, the state, and the status.
Example of files:
Input Snow Vermont 172350
Swamp Georgia 129327
Duluth Arizona 92465
Output Snow surplus 47350
Swamp surplus 4327
Duluth shortfall -32535
Dear Student, I have reviewed your assignment thoroughly, based on your assignment details and current... View the full answer