Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

looking for an expert on Object-oriented Programming, please. It's about Numerical Data **Could you use the Netbeans app** **please separate the questions with the question

looking for an expert on Object-oriented Programming, please.

It's about Numerical Data

**Could you use the Netbeans app**

**please separate the questions with the question number**

image text in transcribedimage text in transcribed

Object-oriented Programming Lab 2 - Numerical Data Suppose we have the following declarations: int m, n, - 3, j - 4, k = 5; float v, w, x = 34.5f, y = 12.25 Determine the value assigned to the variable in each of the following assignment statements or explain why it is not a valid assignment. f. + * n = + x + y a. w - Math.POW (3, Math.powto) b. x / w = Math.ceil(y) % k; d. (int) x / y * 1 / 2; x - Math sqrt(**i 4*j*) C. h. i. ji k/ i) i + 1; w - float (x + i); x = x/i/y/j; n = e. 2. Suppose we have the following declarations: int i, j; float x,y; double Which of the following assignments are valid? b. i = x; x-u + y; x - 23.4 + j *y; v (int) x; y = j / i* xi 3. a. b. c. d. Write Java expressions to compute each of the following: The square root of B2 + 4AC (A and C are distinct variables) The square root of X + 4Y3 The cube root of the product of X and Y The area R2 of a circle Write a program to convert centimeters (input) to feet and inches (output). 1 in = 2.54 cm. Write a program that inputs temperature in degrees Celsius and prints out the temperature in degrees Fahrenheit. The formula to convert degrees Celsius to the equivalent degrees Fahrenheit is 4. 5. Fahrenheit = 1.8 * Celsius +32 6. Write a program that accepts a person's weight and displays the number of calories the person needs in one day. A person needs 19 calories per pound of body weight, so the formula expressed in Java is calories = bodyweight * 19; (Note: We are not distinguishing between genders.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2018 Dublin Ireland September 10 14 2018 Proceedings Part 1 Lnai 11051

Authors: Michele Berlingerio ,Francesco Bonchi ,Thomas Gartner ,Neil Hurley ,Georgiana Ifrim

1st Edition

3030109240, 978-3030109240

More Books

Students also viewed these Databases questions