Questions: 652

Answers by our Experts: 652

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

It is late at night, and you decide to get a glass of milk before bed. Try to write

pseudocode describing the process of going to the kitchen and getting the milk. Be

very specific and make sure you have all actions in the correct sequence. For example,

remember you must open the refrigerator door before you reach in to retrieve the milk

container. What if there is no glass in the cupboard? Did you check whether the glass

was right side up before you started pouring? Now consider how many small

decisions you make every day, and consider how involved it would be to write a

program to instruct a robot to do the things you do in a day!


State whether each of the following is true or false. If false, explain why.

  1. An algorithm is a procedure for solving a problem in terms of the actions to execute and the order in which these actions execute.
  2. A set of statements contained within a pair of parentheses is called a block.
  3. A selection statement specifies that an action is to be repeated while some condition remains true.
  4. A nested control statement appears in the body of another control statement.
  5. Java provides the arithmetic compound assignment operators +=, -=, *=, /= and %= for abbreviating assignment expressions.
  6. The primitive types (boolean, char, byte, short, int, long, float and double) are portable across only Windows platforms.
  7. Specifying the order in which statements (actions) execute in a program is called program control.
  8. The unary cast operator (double) creates a temporary integer copy of its operand.
  9. Instance variables of type boolean are given the value TRue by default.
  10. Pseudocode helps a programmer think out a program before attempting to write it in a programming language.

 

Write four different Java statements that each add 1 to integer variable x.


Explain four (4) reasons why its necessary to use methods in your Java programs.


Assignment 1


Write a program in Java that returns the maximum for three numbers


Assignment 2

Based on Assignment 1, write an algorithm for your implementation



It is late at night, and you decide to get a glass of milk before bed. Try to write

pseudocode describing the process of going to the kitchen and getting the milk. Be

very specific and make sure you have all actions in the correct sequence. For example,

remember you must open the refrigerator door before you reach in to retrieve the milk

container. What if there is no glass in the cupboard? Did you check whether the glass

was right side up before you started pouring? Now consider how many small

decisions you make every day, and consider how involved it would be to write a

program to instruct a robot to do the things you do in a day!


Draw a flow chart to compute the sum of the series: 

𝑓(𝑥) = 1 + 𝑥 + 𝑥

2 + 𝑥

3 + … + 𝑥

𝑛


Provide a Pseudocode to illustrate the assignment of 10 to X if X < Y otherwise 

5 is assigned to X.


Flow chart for the sum of the series f(x)=1+x +x^2+x^3+...+x^n


Flow chart for 10 to x if x<y otherwise 5 is assigned to x



1)write an algorithm to find the area of a rectangular using pseudocode


2)write an algorithm to find the mean of 5 numbers.


3)write an algorithm to find wether a given number is even or odd


LATEST TUTORIALS
APPROVED BY CLIENTS