Java
Write an expression that computes the difference of the variables endingTime and startingTime
LANGUAGE: JAVA CHALLENGE: Write an expression that computes the difference of the variables endingTime and startingTime
Read MoreGiven the variables taxablePurchases and taxFreePurchases (already declared and assigned values ), write an expression corresponding to the total amount purchased.
LANGUAGE: JAVA CHALLENGE: Given the variables taxablePurchases and taxFreePurchases (already declared and assigned values ), write an expression corresponding to the total amount purchased.
Read MoreA wall has been built with two pieces of sheetrock, a smaller one and a larger one. The length of the smaller one is stored in the variable small. Similarly, the length of the larger one is stored in the variable large. Write a single expression whose value is the length of this wall.
LANGUAGE: JAVA CHALLENGE: A wall has been built with two pieces of sheetrock, a smaller one and a larger one. The length of the smaller one is stored in the variable small. Similarly, the length of the larger one is stored in the variable large. Write a single expression whose value is the length of this…
Read MoreWrite an expression that computes the sum of two variables verbalScore and mathScore (already declared and assigned values).
LANGUAGE: JAVA CHALLENGE: Write an expression that computes the sum of two variables verbalScore and mathScore (already declared and assigned values).
Read MoreWrite a hexadecimal integer literal representing the value fifteen.
LANGUAGE: JAVA CHALLENGE: Write a hexadecimal integer literal representing the value fifteen.
Read MoreWrite a literal representing the long integer value twelve billion.
LANGUAGE: JAVA CHALLENGE: Write a literal representing the long integer value twelve billion.
Read MoreQUESTION 1: Which token is a literal? A) 77 B) main C) int D) + E) salary QUESTION 2: Which token is NOT a keyword (language-determined identifier)? A) int B) sum C) double D) return E) char
LANGUAGE: JAVA CHALLENGE: QUESTION 1: Which token is a literal? A) 77 B) main C) int D) + E) salary QUESTION 2: Which token is NOT a keyword (language-determined identifier)? A) int B) sum C) double D) return E) char
Read MoreGiven an integer variable bridgePlayers, write a statement that increases the value of that variable by 4.
LANGUAGE: JAVA CHALLENGE: Given an integer variable bridgePlayers, write a statement that increases the value of that variable by 4.
Read MoreGiven two integer variables matricAge and gradAge, write a statement that gives gradAge a value that is 4 more than the value of matricAge.
LANGUAGE: JAVA CHALLENGE: Given two integer variables matricAge and gradAge, write a statement that gives gradAge a value that is 4 more than the value of matricAge.
Read MoreGiven two int variables, firstPlaceWinner and secondPlaceWinner, write some code that swaps their values. Declare any additional variables as necessary.
LANGUAGE: JAVA CHALLENGE: Given two int variables, firstPlaceWinner and secondPlaceWinner, write some code that swaps their values. Declare any additional variables as necessary.
Read MoreGiven three already declared int variables, i, j, and temp, write some code that swaps the values in i and j. Use temp to hold the value of i and then assign j ‘s value to i. The original value of i, which was saved in temp, can now be assigned to j.
LANGUAGE: JAVA CHALLENGE: Given three already declared int variables, i, j, and temp, write some code that swaps the values in i and j. Use temp to hold the value of i and then assign j ‘s value to i. The original value of i, which was saved in temp, can now be assigned to j.
Read MoreGiven two int variables, i and j, which have been declared and initialized, and two other int variables, itemp and jtemp, which have been declared, write some code that swaps the values in i and j by copying their values to itemp and jtemp respectively, and then copying itemp and jtemp to j and i respectively.
LANGUAGE: JAVA CHALLENGE: Given two int variables, i and j, which have been declared and initialized, and two other int variables, itemp and jtemp, which have been declared, write some code that swaps the values in i and j by copying their values to itemp and jtemp respectively, and then copying itemp and jtemp to j…
Read More