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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 20 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply