1. Create a program (console or GUI your choice) calledCalculamatronthat will prompt a user for the length width and height (all in feet) of a room. The program will then call a method (writtenby you) that computes the volume(in cubicfeet) of the room using the user-provided values.You must pass those values (as parameters) to your method. The method will use those parameters to figure the volume of the room (formula is length * width * height) thenRETURNthat value. The code that called the method should display the value that was returned by your method.
2. Create a program calledMagic8Ball(console or GUI your choice). The program should contain a method (written by you) that declaresan array of at least five strings with Magic 8-Ball type phrases such as The answer seems certain (you can make up thephrases or use traditionalones–googlemagic 8ball phrasesto see them. Your method should accept one parameter an index into the array of phrase strings. Yourmethod will display the phrase associated with the index that’s passed into the method. For example if the string at phrases was The future seems cloudy and the calling program passed the value 4 into your method then the method would display The future seems cloudy.Include error-handlingin your method so that only valid indexes will produce output.