Difference between revisions of "Spring 2020: Programming in Java Lab"

From MKWiki
Jump to navigation Jump to search
Line 26: Line 26:
 
|| Practice Set ||
 
|| Practice Set ||
  
 +
|}
 +
 +
 +
{| class="wikitable" style="text-align: left; width: 100%";
 +
|-
 +
! Q. NO. 
 +
! Program 
 +
! Lab Exercise No. 
 +
! Remarks
 +
|-
 +
| style="width: 8%"  | 1
 +
| style="width: 60%" | WAP to print first n even numbers
 +
| style="width: 15%" | Practice Set No. 13
 +
|
 +
|-
 +
| 2 || WAP to find sum of first n odd numbers || Practice Set No. 14 ||
 +
|-
 +
| 3 || WAP to check whether the given number is prime or not || Practice Set No. 12 ||
 +
|-
 +
| 4 || WAP to print the following pattern using nested for loop:<br>
 +
*<br>
 +
*  *<br>
 +
*  *  *<br>
 +
*  *  *  *
 +
|| Practice Set No. 17 ||
 +
|-
 +
| 5 || WAP to sort an array using built in PHP function || Lab Exercise No. 2  ||
 
|}
 
|}

Revision as of 23:20, 14 January 2020

  • Instructions
    • Please be on time to avoid the attendance penalty.
    • Turn off(shutdown) your assigned computer after finishing your work (or before you leave the lab).
    • Please arrange the chair in proper place while leaving the lab.
    • Please put your phone in silent mode.


Lab 1: Getting Started ( week of 8th January 2020 )

  • Brief introduction to Java Basic Building Blocks Download
Q. NO. Program Lab Exercise No. Remarks
1 WAP to find the sum of any number of integers entered as command line argument 1
2 WAP to find the factorial of a given number 2
3 WAP to check whether the given number is prime or not 6
4 WAP to print the following pattern using nested for loop:
*
* *
* * *
* * * *
Practice Set


Q. NO. Program Lab Exercise No. Remarks
1 WAP to print first n even numbers Practice Set No. 13
2 WAP to find sum of first n odd numbers Practice Set No. 14
3 WAP to check whether the given number is prime or not Practice Set No. 12
4 WAP to print the following pattern using nested for loop:
*
* *
* * *
* * * *
Practice Set No. 17
5 WAP to sort an array using built in PHP function Lab Exercise No. 2