Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Evaluate the expression. Math.sqrt(1+2+3+4) 2. Evaluate the expression. Math.exp(-Math.pow(Math.sin(1), 0.25)) 3. Write a Java expression to calculate the area of a triangle, given three

image text in transcribed

1. Evaluate the expression. Math.sqrt(1+2+3+4) 2. Evaluate the expression. Math.exp(-Math.pow(Math.sin(1), 0.25)) 3. Write a Java expression to calculate the area of a triangle, given three sides a, b, c. (Heron's formula) 4. Write a Java expression for the mathematical formula. 1 217 e *2 5. The monthly payment cof a mortgage of n months with monthly interest rater for a principal p is given by the mathematical formula. CE pr(1+r)" (1+r) 1 Write a Java expression to calculate the monthly payment. 6. Let s be a string of odd length. Write a Java expression to give a substring of s with the center character removed. For example, if s is "Program", the expression should give "Proram". 7. Let s be a string of length at least 2. Write a Java expression to give a string with the first and last characters of s swapped. For example, if s is "dog", the expression should give "god". 8. Let s1 and s2 be two strings of even lengths. Write a Java expression to combine the first half of s1 and the second half of s2, if s1 is "Computer and s2 is "Programmer" the expression should give "Compammer". 9. A string variable fullName represents a full name such as "Doe, John". Write a Java expression to give a string of first initial and last name, e.g., ". Doe

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

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions

Question

differentiate the function ( x + 1 ) / ( x ^ 3 + x - 6 )

Answered: 1 week ago