Difference between revisions of "Spring 2020: Programming in Java Lab"
Jump to navigation
Jump to search
Line 68: | Line 68: | ||
| style="width: 60%" | WAP to convert a decimal number to a binary number | | style="width: 60%" | WAP to convert a decimal number to a binary number | ||
| style="width: 15%" | Lab Exercise No. 5 | | style="width: 15%" | Lab Exercise No. 5 | ||
− | | | + | | [http://mkbhandari.com/mkwiki/data/spring2020/D2B.java '''Program Sample'''] |
|- | |- | ||
| 2 || WAP to convert a decimal number to a octal number || Practice Set No. L3 || | | 2 || WAP to convert a decimal number to a octal number || Practice Set No. L3 || |
Revision as of 11:01, 22 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.
Contents
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 | Lab Exercise No. 1 | |
2 | WAP to find the factorial of a given number | Lab Exercise No. 2 | |
3 | WAP to check whether the given number is prime or not | Lab Exercise No. 6 | |
4 | WAP to print the following pattern using nested for loop:* |
Practice Set No. L1 |
Lab 2: ( week of 15th January 2020 )
- Reading input from keyboard, Arrays Download
Q. NO. | Program | Lab Exercise No. | Remarks |
---|---|---|---|
1 | WAP to read data of various types from user(keyboard) | Practice Set No. L2 | |
2 | Rewrite the Lab Exercise No. 3, by taking the number as input from the keyboard | Lab Exercise No. 6 | |
3 | WAP to learn use of single dimensional array by defining the array dynamically | Lab Exercise No. 3 | |
4 | WAP to Search an element in the array(Linear Search) | Practice Set No. L2(2) | |
5 | WAP to learn use of Two dimensional array by defining the array dynamically | Lab Exercise No. 4 |
Lab 3: ( week of 22nd January 2020 )
Q. NO. | Program | Lab Exercise No. | Remarks |
---|---|---|---|
1 | WAP to convert a decimal number to a binary number | Lab Exercise No. 5 | Program Sample |
2 | WAP to convert a decimal number to a octal number | Practice Set No. L3 | |
3 | WAP to find the sum of any number of integers interactively, i.e., entering every number from the keyboard, where as the total number of integers is given as a command line argument. | Lab Exercise No. 7 | |
4 | WAP that show working of different functions of String and StringBuffer class like setCharAt(), setLength(), append(), insert(), concat(), and equals() | Lab Exercise No. 8 |
Lab 4: ( week of 29th January 2020 )
- Lab Assignment