Reference no: EM131395118
1. What is the value of mystery after this sequence of statements?
int mystery = 1;
mystery = 1 - 2 * mystery;
mystery - mystery + 1;
2. What is wrong with the following sequence of statements?
int mystery 1;
mystery - mystery + 1;
int mystery 1 - 2 * mystery;
3. Write the following mathematical expressions in Java.
s = so + vot + 1/2 gt2
G = 4 Π2.a3/p2(m1 + m2)
FV = PV.(1 + INT/100)YRS
c = √(a2 + b2 - 2abcosγ)
4. Write the following Java expressions in mathematical notation.
a. dm . m * (Math.sqrt(1 + v / c) / Math.sqrt(1 - v / c) - 1);
b. volume = Math.PI * r * r * h;
c. volume = 4* Math.PI * Math.pow(r, 3) / 3;
d. z = Math.sqrt(x * x + y * Y);
5. What are the values of the following expressions? In each line, assume that
double x = 2.5;
double y = -1.5;
int m = 18;
int n = 4;
a. x + n * y- (x + n) * y
b. m /n + m%n
c. 5 * x - n / 5
d. 1 - (1 - (1 - (1 - (1 - n))))
e. Math.sqrt(Math.sqrt(n))
6. What are the values of the following expressions, assuming that n is 17 and m is 18?
a. n / 10 + n % 10
b. n % 2 + m % 2
C. (m + n) / 2
d. (m + n) / 2.0
e. (int) (0.5 * (m + n))
f. (int) Math.round(0.5 * (m + n))
7. What are the values of the following expressions? In each line, assume that
String s - "Hello";
String t "World";
a. s.length() + t.length()
b. s.substring(1, 2)
C. s.substring(s.length() / 2, s.length())
d.s + t
e. t + s
8. Find at least five compile-time errors in the following program.
public class HasErrors
public static void main();
{
System.out.print(Please enter two numbers:)
x in.readDouble;
y in.readDouble;
System.out.printline("The sum is " + x + y);
}
}
9. Find three run-time errors in the following program.
public class HasErrors
public static void main(String[] args)
{
int x - 0;
int y 0;
Scanner in - new Scanner("System.in");
System.out.print("Please enter an integer:");
x in.readInt();
System.out.print("Please enter another integer: ");
x in.readInt();
System.out.println("The sum is " + x + y);
}
Really about serving the bottom of the pyramid
: Was the Internet.org initiative really about serving the bottom of the pyramid or was it more about Facebook trying to expand its reach? Analyze.
|
Analyze two career options in the health care industry
: Analyze two career options in the health care industry, in terms of the educational requirements, job responsibilities, and average salaries.Using the following Bureau of Labor Statistics Healthcare Occupations Website research two differences betwe..
|
What are the basic and non basic variables
: Consider the partial simplex tableau shown below: In the tableau, what are the non basic variables? In the optimal tableau, what are the basic variables
|
Determine the absolute weight and the weight
: determine the absolute weight and the weight relative to the rotating earth of a 9o-kg man if he is standing on the surfsce of the earth at a latitude of 40 degrees
|
Find three run-time errors in the program
: Find three run-time errors in the program - What are the values of the following expressions and what is the value of mystery after this sequence of statements?
|
Form of argumentation - humans have feet
: Determine whether each is strong or weak, and note the relationship between your answer and the truth or falsity of the premise(s) and conclusion.- Unlike monkeys, today's humans have feet that are not suited for grasping objects.
|
Companies in different industries
: Going to google.com internet search to identify at least 2 companies in different industries that have entered into outsourcing agreements with firms with specialized services. In addition, describe what value chain activities the companies have ..
|
Determine the combined moment of the two 20-lb forces
: The flexible shaft AB of the wrench is bent into a horizontal arc with a radius of 24 in. The two 20-lb forces, which are parallel to the z-axis, are applied to the handle CD, as shown.
|
Ethics and corporate scandal
: In this assignment, you will analyze a corporate scandal by considering the leadership skills and competencies that were lacking in corporate leadership, and looking closely at the way the scandal was handled by leadership. Your work in this assig..
|