public class q1 { public static void main(String[] args) { int x=3; int y=6; double q1= (2*x + y*y + 6)/-y; double q2= 2*x*x - 8; System.out.println("Here are the declared and initialized variables: " + "x = " + x + ", " + "y = " + y); System.out.println("Here are the output values of the functions: " + "f(3, 6) = " + q1+", "+"g(3) = "+q2); } } public class q2 { public static void main(String[] args) { double b = 2.5; double h = 9.4; double l = 3.5; double v = b*h*l/2; System.out.println("If the base is " +b+ ", the height is "+h+" and the length is "+l+" then"); System.out.println("The volume of the prism is "+v); } }