Cash-back offer from May 2nd to 7th, 2024: Get a flat 10% cash-back credited to your account for a minimum transaction of $50.Post Your Questions Today!

Question DetailsNormal
$ 16.00

IT 401 Assignment 3 | Complete Solution

Question posted by
Online Tutor Profile
request

Question One
Do as Directed. (Each question will have 1 mark)
(i)    What will be output of the following code?

        int i = 0;
        while (i != 9)
        {
           System.out.println(" " + i);
           i = i + 2;
}
        Answer:
            

(ii)    What will be the output of the following code?

        int i = 1;
        int sum = 0;
        while (i <= 11)
        {
           sum = sum + i;
           i++;
        }

     System.out.println("The value of sum is " + sum);
     System.out.println("The loop will continue  " + i + “ times.”);
Answer:
            
    
(iii)    How many times does the following Java code display "Java Program" output?

        for (int i = 0; i < 10; i++);
        {
           System.out.println(" Java Program ");
 }
        
        Answer:
        
(iv)    In the following code, How many times the output “My Name” will be print?

        int p;
        int q;
        for (p = 0; p <= 9; p++)
        {
           for (q = p; q < 5; q++)
           {
              System.out.println("My Name");
              if (q == 2)
              {
                 q = 6;
              }
           }
}
        Answer:
            
Question Two
Write a program in Java using “Nested For” Loop to print Diamond star pattern.
      *
    *  *
  *  *  *
                *   *   *  *   
                             *   *   *   *   *    
 
Provide  a screenshot of your work.

Question Three
Write a short notes on Following topics. (each question will have 1 mark)

a.    What is an Array?
b.    How do declare array in various format?

c.    Define Array List.

d.    Give an example for add and remove array element.


Question Four
Write a Java Program to display following output using Array List.


Before 2015 Saudi Electronic University Branch: 0
After 2015: 7
Number of Branch: [Dammam, Tabuk, Jeddah, Madinah, Al Qassim, Abha, Al Jouf]
Number of Branch after deletions: 5
Total of Branch: [Dammam, Tabuk, Madinah, Al Qassim, Al Jouf]


Provide  a screenshot of your work.

Available Answer
$ 16.00

[Solved] IT 401 Assignment 3 | Complete Solution

  • This solution is not purchased yet.
  • Submitted On 22 Dec, 2017 07:59:03
Answer posted by
Online Tutor Profile
solution
(iii) How many times does the following Java code display "Java Program" output?...
Buy now to view the complete solution
Other Similar Questions
User Profile
Exper...

IT 401 Assignment 3 | Complete Solution

(iii) How many times does the following Java code display "Java Program" output? for (int i = 0; i < 10; i++); { System.out.println(" Java Program "); } Answer: “Java Program” will be printed only once becau...
User Profile
Exper...

IT 401 Assignment 2 | Complete Solution

1. double X = 12.5; int Y =X+4; use of double in int calculation correction double Y=X+4; 2. if (x = 1) y++; else if (x = 2) y = y + 2; Use of assignment statement in loop test Correction if(x==1) else i...
User Profile
Exper...

IT 401 Assignment 4 | Complete Solution

To get the number of columns in the third row, You first go to the third row, index 2 (counts[2]). The length method is used to retrieve the number. Therefore, counts[2].length System.out.println(counts[2].length); B The int ...

The benefits of buying study notes from CourseMerits

homeworkhelptime
Assurance Of Timely Delivery
We value your patience, and to ensure you always receive your homework help within the promised time, our dedicated team of tutors begins their work as soon as the request arrives.
tutoring
Best Price In The Market
All the services that are available on our page cost only a nominal amount of money. In fact, the prices are lower than the industry standards. You can always expect value for money from us.
tutorsupport
Uninterrupted 24/7 Support
Our customer support wing remains online 24x7 to provide you seamless assistance. Also, when you post a query or a request here, you can expect an immediate response from our side.
closebutton

$ 629.35