This repository contains Java lab programs from my BCA 2nd Semester at Tribhuvan University. These programs were given by my instructor as lab exercises and solved by me during class.
java-program/
β
βββ π Basic/
β βββ apple price, case check, escape sequences, multiply numbers, triangle area
β
βββ π array/
β βββ 1D Array β search, sort, largest/smallest element
β βββ 2D Array β matrix addition, transpose, diagonal sum
β
βββ π control-flow/
β βββ for-loop β Armstrong numbers, multiplication table, prime check,
β β even numbers, series evaluation, sum of natural numbers
β βββ while-loop β factorial, palindrome check, reverse number, sum of digits
β βββ do-while-loop β Fibonacci series
β βββ switch-case β area calculation, binary-decimal conversion,
β β converters, switch fall-through
β βββ Ternary Operator β greatest number without if
β
βββ π IF else/
β βββ even/odd check, greatest of numbers, grading, vowel/consonant check
β
βββ π oop/
β βββ rectangle area using class and object
β
βββ π Pattern/
βββ pattern1 to pattern10
| Topic | Description |
|---|---|
| Basic | Simple beginner programs to practice Java syntax |
| Array (1D & 2D) | Searching, sorting, and matrix operations |
| Control Flow | Loops (for, while, do-while), switch-case, and ternary operator |
| If-Else | Conditional logic based problems |
| OOP | Basic class and object concepts |
| Pattern | Pattern printing programs (pattern1 to pattern10) |
Ghimire BCA 2nd Semester Student β Tribhuvan University
β If this helped you, consider giving the repo a star!