Answer:
a)True is the answer......
Answer:
The answer is "Result of Flow Graph Analysis".
Explanation:
A flow chart is also known as a graphical representation of any task. It a graphing program, which collects data, checks its control flows and provides abstracts from program details.
- It produces a decision chart in the paper, which reduces the control flow chart but keeps the program branching structure.
- It also used to manage to troubleshoot network issues.
CORRECT QUESTION:
For the given program, how many print statements will execute?
public static void printShippingCharge(double weight) { if((weight > 0.0) && (weight <= 10.0)){ System.out.println(weight * 0.75); }
else if((weight > 10.0) && (weight <= 15.0)) { System.out.println(weight * 0.85); }
else if((weight > 15.0) && (weight <= 20.0)) { System.out.println(weight * 0.95); } }
public static void main(String args[]) {
printShippingCharge(18);
printShippingCharge(6);
printShippingCharge(25); }
Answer:
Two of the print statements will output values
Explanation:
These two calls to the printShippingCharge are the ones that will output values: printShippingCharge(18); and printShippingCharge(6);
The first if statement is true when the value of weight is 6 (weight > 0.0) && (weight <= 10.0)
The Third if statement is true when weight is 18 (weight > 15.0) && (weight <= 20.0)
NOTE: That I made correction to the variable weight. The question isn't consistent with the variable name. It used weight and itemWeight at different points this will lead to a compiller error
Answer:
True
Explanation:
While programming in most programming languages, one will have need to use functions and variables defined in other class libraries. in C++, these functions and variables' definitions are contained in Header files, which can be imported and used into any C++ program by using the pre-processor #include statement. This statement is the equivalent of import in java and copy in other languages. Popular header files are the Maths class (Allows use of maths functions like power, square roots exponentiation etc), the input/output (allows usage of cout print statement and cin input statement)