Create a program (console or GUI, your choice) called Calculamatron that will prompt a user for the length, width, and height (all in feet) of a room. The program will then call a method (written by you) that computes the volume (in cubic feet) 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) then RETURN that value. The code that called the method should display the value that was returned by your method.
Create a program called Magic8Ball (console or GUI, your choice). The program should contain a method (written by you) that declares an array of at least five strings with Magic 8-Ball type phrases such as "The answer seems certain" (you can make up the phrases or use traditional ones--google magic 8ball phrases to see them. Your method should accept one parameter, an index into the array of phrase strings. Your method 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-handling in your method so that only valid indexes will produce output
This assignment has been answered 2 times in private sessions.
Or buy a ready solution below.
© 2023 Codify Tutor. All rights reserved