1. Write down a method that computes the cotangent cot(x) as the ratio of cos(x) and sin(x). This method should have the following header:
public static double cotangent(double x){
2. To attract more tourists, the city of El Paso decided to officially
change the name to Our Beautiful City of El Paso. Because of this
change, we must change all the city documents.
Describe the code that, given a string document
in which the word "El Paso" appears exactly once, replaces the word
"El Paso" in
this string with the sequence "Our Beautiful City of El Paso".
For example, the string
Cars parked illegally in El Paso will be towed away.should be replaced with a string
Cars parked illegally in Our Beautiful City of El Paso will be towed away.Hints:
3. What is a Boolean variable? What values can it take? Why do we need Boolean variables?