Write a Java application that uses the Math class to determine the answers for each of the following: a. The square root of 37 b. The sine and cosine of 300c. The value of the floor, ceiling, and round of 22.8 d. The larger and the smaller of the character ‘D’ and the integer 71 e. A random number between 0 and 20 (Hint: The random() method returns a value between 0 and 1; you want a number that is 20 times larger.) Save the application as MathTest.java.'

Answers

Answer 1
Answer:

Java application:

Java is a programming language and computing platform first released by Sun Microsystems in 1995. It has evolved from humble beginnings to power a large share of today’s digital world, by providing the reliable platform upon which many services and applications are built.

//create a class MathTest.java

public class MathTest {

public static void main(String[] args) {

//a. The square root of 37

System.out.println("The square root of 37= " + Math.sqrt(37));

//b. The sine and cosine of 300

System.out.println("The sine of 300=" + Math.sin(300));

System.out.println("The cosine of 300=" + Math.cos(300));

//c. The value of the floor, ceiling, and round of 22.8

System.out.println("The value of the floor 22.8=" + Math.floor(22.8));

System.out.println("The value of the ceiling 22.8=" + Math.ceil(22.8));

System.out.println("The value of the round 22.8=" + Math.round(22.8));

//d. The larger and the smaller of the character ‘D’ and the integer 71

int number = 'D';

System.out.println("The larger of the character ‘D’ and the integer 71=" + Math.max(number, 71));

System.out.println("The Smaller of the character ‘D’ and the integer 71=" + Math.min(number, 71));

//A random number between 0 and 20

System.out.println("A random number between 0 and 20= "+(int)(Math.random()* 20 + 1));

}

}

Output:

The square root of 37= 6.082762530298219

The sine of 300=-0.9997558399011495

The cosine of 300=-0.022096619278683942

The value of the floor 22.8=22.0

The value of the ceiling 22.8=23.0

The value of the round 22.8=23

The larger of the character ‘D’ and the integer 71=71

The Smaller of the character ‘D’ and the integer 71=68

A random number between 0 and 20= 10

Learn more about the topic Java application:

brainly.com/question/15568820


Related Questions

I need help please?!!!
A _____, or spider, is a search engine program that automatically searches the web to find new websites and update information about old websites. ​a. ​crabb. web ​robotc. ​databased. ​runner
Which method can help you prevent RSI while using a keyboard?Keep the left-hand’s fingers on J, K, L, and ; keys. Rest the left-hand’s fingers on A,S, D, and F keys. Rest the right-hand’s fingers on A,S, D, and F keys. Rest the right-hand’s fingers on Q,W, E, and R keys.
When emergency changes have to be made to systems, the system software may have to be modified before changes to the requirements have been approved. Suggest a model of a pro- cess for making these modifications that will ensure that the requirements document and the system implementation do not become inconsistent.
Mai has recently created her own e-mail account. Her father gave her permission to e-mail her friends and family but warned her that it is dangerous to open e-mails from people she does not know. Mai did not understand why her father would give her this warning. Why did Mai’s father say it is dangerous to open e-mails from unknown senders? Check all that apply. The sender could be a hacker. The e-mail could be inappropriate. The e-mails usually contain jokes. The e-mail may belong to someone else The message may contain a virus.

What two benefits are a result of configuring a wireless mesh network? Check all that apply. 1. Performance
2. Range
3. WiFi protected setup
4. Ad-hoc configuration​

Answers

Based on the information given, the correct options are performance and range.

It should be noted that a mesh network can be regarded as the local network topology whereby infrastructure nodes connect directly, with other different nodes ,cooperate with one another so that data can be efficiently route from/to clients.

The advantage of configuring a wireless mesh network is that it enhances performance and range.

Learn more about network on:

brainly.com/question/1167985

Answer:

1)PERFORMANCE

2)RANGE

Explanation:

A mesh network can be regarded as local network topology whereby infrastructure nodes connect dynamically and directly, with other different nodes ,cooperate with one another so that data can be efficiently route from/to clients. It could be a Wireless mesh network or wired one.

Wireless mesh network, utilize

only one node which is physically wired to a network connection such as DSL internet modem. Then the one wired node will now be responsible for sharing of its internet connection in wireless firm with all other nodes arround the vicinity. Then the nodes will now share the connection in wireless firm to nodes which are closest to them, and with this wireless connection wide range of area can be convered which is one advantage of wireless mesh network, other one is performance, wireless has greater performance than wired one.

Some of the benefits derived from configuring a wireless mesh network is

1)PERFORMANCE

2)RANGE

____ means saving data in computer memory.

Answers

Answer: Storage

Explanation:

Storage means means saving data in computer memory. Memory refers to the location which is meant for short-term data, while storage is the part of the computer system that allows an individual to store and also access data on long-term basis.

It should be noted that typically, storage usually comes in form of a hard drive or a solid-state drive.

What is this car first to awnser is the brianliest

Answers

Answer: Lamborghini

Explanation: Is it yours

Lamborghini ?????????????

Which of the following protocols is used to unsure secure transmissions on port 443?A. HTTPSB. TelnetC. SFTPD. SHTTP

Answers

Answer:

A. HTTPS

Explanation:

Default HTTP port is 80. This means that the server request is received on port 80. But default HTTP request is susceptible to interception. In order to prevent it, HTTP communication is secured using SSL encryption (HTTPS protocol). In this case the Url string begins with 'https://' which differentiates it from normal web request. The default port used for HTTPS service is 443 instead of 80.

Blank spaces or unseen control characters in a data file are referred to as

Answers

Answer:

White spaces or WHITESPACE

Implement the logic function ( , , ) (0,4,5) f a b c m =∑ in 4 different ways. You have available 3to-8 decoders with active high (AH) or active low (AL) outputs and OR, AND, NOR and NAND gates with as many inputs as needed. In every case clearly indicate which is the Most Significant bit (MSb) and which is the Least Significant bit (LSb) of the decoder input.

Answers

Answer:

See explaination

Explanation:

Taking a look at the The Logic function, which states that an output action will become TRUE if either one “OR” more events are TRUE, but the order at which they occur is unimportant as it does not affect the final result. For example, A + B = B + A.

Alternatively the Most significant bit which is also known as the alt bit, high bit, meta bit, or senior bit, the most significant bit is the highest bit in binary.

See the attached file for those detailed logic functions designed with relation to the questions asked.