Discuss the concept of parameters. What are parameters for? What is the difference between formal parameters and actual parameters? Give an example in Java code that illustrates formal parameters and actual parameters.
Give an example of a while loop, then provide the equivalent do-while loop and for loop. Then give a different example of a do-while loop along with the equivalent while loop and for loop. Finally give an example of a for loop along with the equivalent while loop and do-while loop. Use your examples to illustrate the advantages and disadvantages of each looping structure and describe those disadvantages and advantages.
Write the pseudocode for a program that will continue prompting a user for a value whilst the total of all values remain less than 100. The program must keep track of the number of times the loop executes and display the number of times the loop executed once the loop had finished executi
By means of examples, explain what programming environments and users environments refer to.
Produce the equivalent 'for loop for the while loop. Make use of pseudo code to formulate
Rewrite the following expressions using an if...else statement. (Assume
that all variables are declared properly.)
(fuel >= 10) ? drive = 150 : drive = 30;
Rewrite the following expressions using the conditional operator. (Assume
that all variables are declared properly.)
if (hours >= 40.0)
wages = 40 * 7.50 + 1.5 * 7.5 * (hours - 40);
else
wages ΒΌ hours * 7.50;