18. Write a class to keep track of movement of a cat. Include three instance variables to hold the x, y, and z positions of the cat. Include a method for the cat to walk to another position. This method has two parameters specifying the change in x and the change in y. If the cat is at (3, 4, 5) and we ask it to walk (1, 4) then it will be at (4, 8, 5). (Walking is a horizontal action here.) Include a method for the cat to jump to another position. This method has one parameter specifying the change in the cat's vertical position. If the cat is at (3, 4, 5) and we ask it to jump (5) it will be at (3, 4, 10). Include a method to display a cat's position. Test in a main method, creating a few cats and have them walk and jump. Display their final position. 22. Write a coffee vending machine class. Include fields giving the number of cups of coffee available, the cost of one cup of coffee, and the total amount of money inserted by the user. This machine requires exact change. Include one constructor which stocks the machine with a quantity and price of coffee specified as parameters, and another with no parameters which stocks the machine with 10 cups of coffee at fifty cents each. Include the following methods: menu() //display the quantity and price of the coffee insert (int quarters, int dimes, int nickels) //inserts the given amount select() //dispenses a cup of coffee if user has inserted enough // money and coffee is available, otherwise displays a message refund() // returns the money inserted Write a main method to create some vending machines and test their operation. HAVE TO PUT A COMMENT IN EVERYLINE
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.
JAVA only NOT OTHERSS
## Deadline information
IF POSSIBLE done in 3-4 HOURS ONCE THE BID HAS BEEN ACCEPTED