Understanding java discussion | Computer Science homework help

 Please respond to the below text in 100 words or more.

While  researching the topic I learned that selective statements are used for  decision making in the code. Selective statements use lines such as “if”  or “else”. An example of this would be to find if a number is greater  than or equal to a number in an equation. I wrote the following simple  code in Eclipse to help demonstrate this.

int A=4;

if (A<3||A>3) {

System.out.println(“A is not equal to 3”);

}else {System.out.println(“A is equal to 3”);

The code would see the number 4 and be able to tell you that it is not equal to 3.

Repetitive  statements are different from selective statements as they are used to  repeat the code or are used for looping if they are within the  parameters you have set. Repetitive statements use the “for statement”,  “while statement”, and “do-while statement”.

Using math again for my examples I have used the following codes to show how these statements work.

for (int x = 0; x*2 < 15; x++)

{

System.out.println(x);

In  this example I am using the for statement. Essentially, I am asking the  code to give me all the numbers that can be multiplied by 2 without  going over 15. It will start with 0 and go up one number until 7, as any  integer above 7 would be greater than 15. 

int x = 0;

while (x <= 200)

{

System.out.println(x);

x = x+50;

The  while statement is used here to tell the code that it wants it to  repeat adding 50, while starting at 0 while not going over 200.







Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Get 15% OFF on your FIRST order. Use the coupon code: new15