Total Pageviews
Wednesday, May 27, 2020
Monday, May 25, 2020
java theory question set 4
BALAGURUSAMY CHAPTER 4::
| SL. NO | QUESTION | MARKS | PAGE NO | LINK1 | LINK2 | LINK3 |
| 1. | PRIMITIVE ,NON PRIMITIVE DATA TYPES | 2 | 46 | |||
| 2. | SIZE AND RANGE OF DATA TYPES | 2 | 48 | |||
| 3. | SCOPE OF VARIABLES | 2 | 51 | |||
| 4. | TYPE CASTING | 2 | 53 | |||
| 5. | AUTO TYPE CASTING | 2 | 53 | |||
| 6. | DEFAULT VALUE OF DATA TYPE | 2 | 57 |
java theory question set 3
BALAGURUSAMY CHAPTER 3::
| SL. NO | QUESTION | MARKS | PAGE NO | LINK1 | LINK2 | LINK3 |
| 1. | WHY MAIN() IS STATIC | 2 | 26 | |||
| 2. | TOKEN | 2 | 30 | |||
| 3. | LITERALS | 33 | ||||
| 4. | SEPARATORS | 34 | ||||
| 5. | CLASSIFICATION OF JAVA STATEMENTS | 36 | ||||
| 6. | JAVA VIRTUAL MACHINE | 39 | ||||
| 7. | COMMAND LINE ARGUMENT | 40 |
java theory question set 2
BALAGURUSAMY CHAPTER 2::
| SL. NO | QUESTION | MARKS | PAGE NO | LINK1 | LINK2 | LINK3 |
| 1. | COMPILER AND INTERPRETER | 4 | 13 | |||
| 2. | BYTECODE | 2 | 13 | |||
| 3. | JVM | |||||
| 4. | COMPARE WITH C AND C++ | 3 | 15 | |||
| 5. | JAVA DEVELOPMENT TOOLS | TABLE 2.3 | ||||
| 6. | APPLICATION PROGRAMMING INTERFACE | 22 |
java theory question set 1
BALAGURUSWAMY CHAPTER 1::
| SL. NO | QUESTION | MARKS | PAGE NO | LINK1 | LINK2 | LINK3 |
| 1. | DATA ABSTRACTION | 2 | 4 | |||
| 2. | ENCAPSULATION | 2 | 4 | |||
| 3. | INHERITANCE | 2 | 4 | |||
| 4. | POLYMORPHISM | 2 | 5 | |||
| 5. | DYNAMIC BINDING | 2 | 6 | |||
| 6. | MESSAGE COMMUNICATION | 2 | 6 | |||
| 7. | BENEFIT OF OOPS | 3 | 8 |
Tuesday, May 19, 2020
COMPUTER ARCHITECTURE LAB ASSIGNMENT
| 1. | LDA , STA instruction IN COMPUTER ARCHITECTURE | LINK |
| 2. | addition of two hexadecimal numbers | LINK |
| 3. | addition of three hexadecimal numbers | LINK |
| 4. | 1'S COMPLEMENT OF A NUMBER | LINK |
| 5. | 2'S COMPLEMENT OF A NUMBER | LINK |
| 6. | SUBTRACTION of two hexadecimal number | LINK |
| 7. | LDA DIRECT MODE , INDIRECT MODE | LINK |
| 8. | STA direct mode indirect mode | LINK |
| 9. | ADD DIRECT MODE INDIRECT MODE | LINK |
| 10. | AND INSTRUCTION DIRECT INDIRECT MODE | LINK |
| 11. | OR OPERATION USING AND INSTRUCTION | LINK |
| 12. | ADDITION OF TWO DECIMAL ADDITION | LINK |
| 13. | CIR INSTRUCTION | LINK |
| 14. | CIL INSTRUCTION | LINK |
| 15. | CLE,CME INSTRUCTION | LINK |
| 16. | 4TIMES CIL | LINK |
| 17. | 4TIMES CIR | LINK |
| 18. | BUN INSTRUCTION | LINK |
| 19. | ISZ INSTRUCTION | LINK |
| 20. | SPA INSTRUCTION | LINK |
| 21. | SNA INSTRUCTION | LINK |
| 22. | SZA INSTRUCTION | LINK |
| 23. | SZE INSTRUCTION | LINK |
sta direct mode indirect mode BY BIJAN KRISHNA PAUL
sta direct mode indirect mode BY BIJAN KRISHNA PAUL
AND INSTRUCTION DIRECT INDIRECT MODE BY BIJAN KRISHNA PAUL
AND INSTRUCTION DIRECT INDIRECT MODE BY BIJAN KRISHNA PAUL
ADD DIRECT MODE INDIRECT MODE BY BIJAN KRISHNA PAUL
ADD DIRECT MODE INDIRECT MODE BY BIJAN KRISHNA PAUL
LDA DIRECT MODE INDIRECT MODE BY BIJAN KRISHNA PAUL
LDA DIRECT MODE INDIRECT MODE BY BIJAN KRISHNA PAUL
postfix++,prefix++ unary operator in c language example
postfix++,prefix++ unary operator in c language example
Friday, May 15, 2020
West Bengal Board class 11 visual basic program 4. get input from inputbox and check it is positive negative or zero
West Bengal Board class 11 visual basic program 4. get input from inputbox and check it is positive negative or zero
End Sub
Get input using inputbox, and then check it is positive or negative or zero in vb6,print using msgbox (visual basic)
Private Sub Form_Load()
Dim a As Integer
a = Int(InputBox("enter a number"))
If a = 0 Then
MsgBox (a & "is zero")
ElseIf a > 0 Then
MsgBox (a & "is positive")
Else
MsgBox (a & "is nagetive")
End If
West Bengal Board class 11 visual basic program 3. get input using inputbox and then sum of digit
West Bengal Board class 11 visual basic program 3. get input using inputbox and then sum of digit
Get input using inputbox, and then sum of digits (2digit) and display using msgbox in vb6(visual basic)
Private Sub Form_Load()
Dim a, b, c As Integer
a = Int(InputBox("enter a number"))
b = a Mod 10
c = a \ 10
d = b + c
MsgBox (d)
End Sub
West Bengal Board class 11 visual basic program 2. input a number and check it is even or odd
West Bengal Board class 11 visual basic program 2. input a number and check it is even or odd
West Bengal Board class 11 visual basic program 1. input numbers using inputbox and then print sum
West Bengal Board class 11 visual basic program
1. input numbers using inputbox and then print sum
Monday, May 11, 2020
DATA STRUCTURE AND ANALYSIS OF ALGORITHM THEORY
1. ADT
2. ARRAY
3. STACK
4. QUEUE
5. LINK LIST
6. CIRCULAR LINK LIST
7. DOUBLY LINK LIST
8. SEARCHING - CLICK HERE
9. SORTING - CLICK HERE
10. HASHING
11. BINARY TREE
12. HASHING
13. GRAPH THEORY ALGORITHMS - CLICK HERE
14. RED-BLACK TREE. - i ) insertion - CLICK HERE
SORTING
CONCEPT AND ALGORITHM
1. BUBBLE SORT - CLICK HERE
2. SELECTION SORT - CLICK HERE
3. INSERTION SORT - CLICK HERE
4. MERGE SORT - CLICK HERE
5. QUICK SORT - CLICK HERE
6. HEAP SORT - CLICK HERE
7. RADIX SORT - CLICK HERE
8. BUCKET SORT
9. SHELL SORT
COMPARISON AND COMPLEXITY
1. BUBBLE SORT
2. SELECTION SORT
3. INSERTION SORT
4. MERGE SORT
5. QUICK SORT
6. HEAP SORT
7. RADIX SORT
8. BUCKET SORT
9. SHELL SORT
1. BUBBLE SORT - CLICK HERE
2. SELECTION SORT - CLICK HERE
3. INSERTION SORT - CLICK HERE
4. MERGE SORT - CLICK HERE
5. QUICK SORT - CLICK HERE
6. HEAP SORT - CLICK HERE
7. RADIX SORT - CLICK HERE
8. BUCKET SORT
9. SHELL SORT
COMPARISON AND COMPLEXITY
1. BUBBLE SORT
2. SELECTION SORT
3. INSERTION SORT
4. MERGE SORT
5. QUICK SORT
6. HEAP SORT
7. RADIX SORT
8. BUCKET SORT
9. SHELL SORT
BUBBLE SORT CONCEPT AND ALGORITHM
BUBBLE SORT CONCEPT AND ALGORITHM
🎯 What is Bubble Sort?
Bubble Sort is a simple sorting algorithm that repeatedly compares adjacent elements and swaps them if they are in the wrong order.
Large elements “bubble up” to the end of the list, like bubbles in water — hence the name.
📌 Definition
Bubble Sort is a comparison-based sorting algorithm in which adjacent elements are repeatedly swapped if they are in the wrong order until the array becomes sorted.
🧠 How Bubble Sort Works
Steps:
- Compare first two elements
- Swap if left > right
- Move one position ahead
- Repeat for entire array
- After each pass, largest element moves to the end
- Repeat until sorted
📊 Example
Unsorted Array:
A = [5, 1, 4, 2, 8]
🔁 Pass 1
| Comparison | Action |
|---|---|
| 5 > 1 | Swap → [1, 5, 4, 2, 8] |
| 5 > 4 | Swap → [1, 4, 5, 2, 8] |
| 5 > 2 | Swap → [1, 4, 2, 5, 8] |
| 5 < 8 | No swap |
👉 Largest (8) is in correct position
🔁 Pass 2
| Comparison | Action |
|---|---|
| 1 < 4 | No swap |
| 4 > 2 | Swap → [1, 2, 4, 5, 8] |
| 4 < 5 | No swap |
🔁 Pass 3
No swaps needed → array already sorted
📌 Final Sorted Array
[1, 2, 4, 5, 8]
💻 Algorithm (Pseudocode)
BubbleSort(A, n)
1. for i = 0 to n-1
2. for j = 0 to n-i-2
3. if A[j] > A[j+1]
4. swap(A[j], A[j+1])
🐍 Python Program for Bubble Sort
def bubble_sort(arr):
n = len(arr)
for i in range(n):
for j in range(0, n - i - 1):
if arr[j] > arr[j + 1]:
arr[j], arr[j + 1] = arr[j + 1], arr[j]
return arr
# Example
arr = [5, 1, 4, 2, 8]
result = bubble_sort(arr)
print("Sorted Array:", result)
Output:
Sorted Array: [1, 2, 4, 5, 8]
⚡ Time Complexity
| Case | Complexity |
|---|---|
| Best Case | O(n) (already sorted) |
| Worst Case | O(n²) |
| Average Case | O(n²) |
📊 Space Complexity
- O(1) (no extra memory used)
🆚 Bubble Sort vs Other Sorting
| Feature | Bubble Sort | Selection Sort | Insertion Sort |
|---|---|---|---|
| Speed | Slow | Slow | Medium |
| Complexity | O(n²) | O(n²) | O(n²) |
| Stability | Yes | No | Yes |
| Best Use | Small data | Small data | Nearly sorted data |
📌 Advantages
- Very simple to understand
- Easy to implement
- No extra memory required
- Stable sorting algorithm
❌ Disadvantages
- Very slow for large datasets
- Many unnecessary comparisons
- Not efficient for real applications
🧠 Real Life Example
- Sorting playing cards in hand 🃏
- Arranging books by height 📚
📌 Summary
- Bubble Sort compares adjacent elements
- Largest elements move to the end after each pass
- Time complexity is O(n²)
- Simple but inefficient for large datasets
❓ Important Questions
Short Questions
- What is bubble sort?
- Why is it called bubble sort?
- What is time complexity of bubble sort?
- Is bubble sort stable?
- Give one example.
Long Questions
- Explain bubble sort with example.
- Write algorithm of bubble sort.
- Write Python program for bubble sort.
- Compare bubble sort with selection sort.
- Explain best and worst case of bubble sort.
3. update length and capacity in stringbuffer java
3. update length and capacity in stringbuffer java
1 string Buffer length and capacity of blank string in java
1 string Buffer length and capacity of blank string in java
string buffer
1. string Buffer length and capacity of blank string in java CLICK HERE
2. string buffer length and capacity in java CLICK HERE
3. update length and capacity in stringbuffer java CLICK HERE
4. ensurecapacity in string buffer java CLICK HERE
5. append() in string buffer java CLICK HERE
6. insert() string buffer java CLICK HERE
7. delete() in string buffer java CLICK HERE
8. reverse() in stringbuffer java CLICK HERE
Thursday, May 7, 2020
input a number and check the number is even or odd in visual basic6
input a number and check the number is even or odd in visual basic6
Wednesday, May 6, 2020
string compareTo () in java
string compareTo first example in java
string compareTo second example in java
Sunday, May 3, 2020
14. Write a program to demonstrate the concept of boxing and unboxing.
14. Write a program to demonstrate the concept of boxing and unboxing.
11. Write a program to show that during function overloading, if no matching argument is found, then java will apply automatic type conversions(from lower to higher data type)
11. Write a program to show that during function overloading, if no matching argument is found, then java will apply automatic type conversions(from lower to higher data type)
10. Modify the ―distance‖ class by creating constructor for assigning values (feet and inches) to the distance object. Create another object and assign second object as reference variable to another object reference variable. Further create a third object which is a clone of the first object.
10. Modify the ―distance‖ class by creating constructor for assigning values (feet and inches) to the distance object. Create another object and assign second object as reference variable to another object reference variable. Further create a third object which is a clone of the first object.
9. Write a program to create a ―distance‖ class with methods where distance is computed in terms of feet and inches, how to create objects of a class and to see the use of this pointer
9. Write a program to create a ―distance‖ class with methods where distance is computed in terms of feet and inches, how to create objects of a class and to see the use of this pointer
Saturday, May 2, 2020
KEYBOARD AND MOUSE ( JAVA )
1. KEYBOARD 1 - CLICK HERE
2. KEYBOARD 2 - CLICK HERE
3. MOUSE 1 - CLICK HERE
4. MOUSE 2 - CLICK HERE
2. KEYBOARD 2 - CLICK HERE
3. MOUSE 1 - CLICK HERE
4. MOUSE 2 - CLICK HERE
VARIABLE ARGUMENTS ( WITH STATIC FUNCTION AND WITHOUT STATIC FUNCTION )
1. VARIABLE LENGTH ARGUMENTS - CLICK HERE
2. VARIABLE LENGTH ARGUMENTS (USING ... OPERATOR) CLICK HERE
3. VARIABLE LENGTH ARGUMENTS (USING FOR INT i :x) CLICK HERE
4. VARIABLE LENGTH ARGUMENTS AND INTEGER VARIABLE,ARRAY CLICK HERE
5. STATIC FUNCTION WITH VARIABLE LENGTH ARGUMENTS CLICK HERE
6. VARIABLE LENGTH ARGUMENTS AND FIXED NUMBER ARGUMENT CLICK HERE
7. VARIABLE LENGTH ARGUMENTS - boolean data type CLICK HERE
8. VARIABLE LENGTH ARGUMENTS WITH OVERLOADING CLICK HERE
6. VARIABLE LENGTH ARGUMENTS AND FIXED NUMBER ARGUMENT
6. VARIABLE ARGUMENTS AND FIXED NUMBER ARGUMENT
4. VARIABLE LENGTH ARGUMENTS AND INTEGER VARIABLE,ARRAY
4. VARIABLE LENGTH ARGUMENTS AND INTEGER VARIABLE,ARRAY
Subscribe to:
Posts (Atom)