Page 1 of 1

Question 6(3 mark) : Write a program to read in two inputs x and y. Use these values to calculate z using the formula sh

Posted: Thu Jul 14, 2022 2:13 pm
by answerhappygod
Question 6 3 Mark Write A Program To Read In Two Inputs X And Y Use These Values To Calculate Z Using The Formula Sh 1
Question 6 3 Mark Write A Program To Read In Two Inputs X And Y Use These Values To Calculate Z Using The Formula Sh 1 (27.53 KiB) Viewed 22 times
don't forget to draw the UML diagram
Question 6(3 mark) : Write a program to read in two inputs x and y. Use these values to calculate z using the formula shown below. And draw the UML diagram of your solution. REQUIREMENTS - The user input is always correct (input verification is not required). - Assume each value is in double type. - Your code must use the Scanner class to read the user input. - The calculation must be done in a separate method called calcValue (double x, double y) which returns the value of z. - You must use Math. pow () in your calculation for both x3 and y4. - Your code must work exactly like the following example (the text in bold indicates the user input). z=0.5+1.1+5x+y4x3+2y​ Example of the program output: Enter value x:2.1 Enter value y:3.6 The value of z is 0.5916732753550871