Ministry of Commerce
Post: Assistant Programmer
Exam Date: 04/03/2021, Exam Taker: BPSC
Two Key Features of Object-Oriented Programming (OOP)
1) Encapsulation
Encapsulation means binding data and related methods together inside a single unit called a class and hiding internal details from the outside world.
Example: In a BankAccount concept, the balance is kept private and can only be accessed or modified through methods like deposit() or withdraw(). This prevents unauthorized access to sensitive data.
2) Inheritance
Inheritance allows a child class to acquire properties and behaviors of a parent class. It promotes code reuse and logical hierarchy.
Example: A Car class can inherit common features (engine, wheels) from a Vehicle class, avoiding code duplication.
Object Oriented Programming (OOP) এর দুটি বৈশিষ্ট্য
1) Encapsulation
Encapsulation হলো data এবং সেই data এর সাথে সম্পর্কিত method গুলোকে একত্রে একটি class এর মধ্যে রাখা এবং বাইরের দুনিয়া থেকে ভিতরের তথ্য লুকিয়ে রাখা।
উদাহরণ: একটি BankAccount ধারণায় account balance সরাসরি access করা যায় না; deposit বা withdraw method এর মাধ্যমে পরিবর্তন করতে হয়। এতে data নিরাপদ থাকে।
2) Inheritance
Inheritance এর মাধ্যমে একটি child class, একটি parent class এর বৈশিষ্ট্য ও আচরণ গ্রহণ করে। এটি code পুনঃব্যবহার সহজ করে।
উদাহরণ: একটি Car class, Vehicle class থেকে engine বা wheel এর মতো সাধারণ বৈশিষ্ট্য পেতে পারে, ফলে একই code বারবার লিখতে হয় না।
#include <stdio.h>
int main{
int I, sum=0
for(i=1,i <= 10,i++){
sum=sum+i
}
printf(sum of
number=d,sum)
return 0
}
#include<stdio.h> int main(){ int i, sum=0; for(i=1; i<=10; i++) { sum = sum + i; } printf("Sum of number=%d", sum); return 0; }
Sample I/O: sum of number= 55
Algorithm BubbleSort(A, n) 1. for i ← 0 to n − 2 do 2. for j ← 0 to n − i − 2 do 3. if A[j] > A[j + 1] then 4. swap A[j] and A[j + 1] 5. end if 6. end for 7. end for 8. StopTime Complexity of Bubble Sort • Best Case: O(n) — when the array is already sorted. • Average Case: O(n²). • Worst Case: O(n²) — when the array is sorted in reverse order.
Array
An array is a collection of elements of the same data type stored in contiguous memory locations.
• All elements must be of the same type (e.g., int, float).
• Elements are accessed using index numbers.
• Used to store similar types of data.
Example: An array storing marks of students..
Structure
A structure is a user-defined data type that can store elements of different data types under one name.
• Members can be of different types (int, float, char, etc.).
• Members are accessed using the dot (.) operator.
• Used to represent a real-world entity.
Example: A structure storing student details (ID, name, marks).
Key Differences
• Array stores same type of data, structure stores different types of data.
• Array elements are accessed by index, structure members by name.
• Structure is more flexible for complex data representation.
C Programming Language এ Structure এবং Array এর মধ্যে পার্থক্য
Array
Array হলো একই ধরনের data type এর একাধিক element এর সমষ্টি, যা memory তে পাশাপাশি সংরক্ষিত থাকে।
• সব element একই data type এর হতে হয়।
• Index number ব্যবহার করে element access করা হয়।
• একই ধরনের data সংরক্ষণের জন্য ব্যবহৃত হয়।
উদাহরণ: ছাত্রদের marks সংরক্ষণের জন্য array।
Structure
Structure হলো একটি user-defined data type যেখানে ভিন্ন ভিন্ন data type এর element একসাথে সংরক্ষণ করা যায়।
• Structure এর member গুলো ভিন্ন data type এর হতে পারে।
• Dot (.) operator ব্যবহার করে member access করা হয়।
• বাস্তব জীবনের object বা entity প্রকাশে ব্যবহৃত হয়।
উদাহরণ: Student এর ID, name এবং marks সংরক্ষণ।
মূল পার্থক্য
• Array একই ধরনের data রাখে, Structure ভিন্ন ধরনের data রাখে।
• Array index দিয়ে access হয়, Structure member নাম দিয়ে access হয়।
• Structure জটিল data সংরক্ষণে বেশি কার্যকর।


Agile Method in Software Development
Agile is a modern software development methodology that focuses on flexibility, customer collaboration, and iterative development. Instead of building the entire software at once, Agile breaks the project into small manageable units called iterations or sprints.
Key Characteristics of Agile
• Development is done in small iterations (usually 1–4 weeks).
• Continuous customer feedback is encouraged.
• Changes in requirements are easily accepted, even in later stages.
• Working software is delivered frequently.
• Emphasis on teamwork and communication.
Agile Process
1) Requirement gathering in the form of user stories.
2) Planning sprint tasks.
3) Development and testing in short cycles.
4) Review and feedback from stakeholders.
5) Continuous improvement for the next sprint.
Advantages of Agile
• Faster delivery of usable software.
• Better customer satisfaction.
• Reduced risk due to continuous testing and feedback.
• High adaptability to change.
Software Development এ Agile Method
Agile হলো একটি আধুনিক software development পদ্ধতি যেখানে flexibility, customer collaboration এবং iterative development এর উপর জোর দেওয়া হয়। এখানে পুরো software একসাথে তৈরি না করে ছোট ছোট অংশে (iteration বা sprint) ভাগ করে তৈরি করা হয়।
Agile Method এর প্রধান বৈশিষ্ট্য
• Development ছোট ছোট iteration এ সম্পন্ন হয় (সাধারণত ১–৪ সপ্তাহ)।
• নিয়মিত customer feedback নেওয়া হয়।
• Requirement পরিবর্তন সহজেই গ্রহণ করা যায়।
• ঘন ঘন working software deliver করা হয়।
• Teamwork ও communication এর উপর গুরুত্ব দেওয়া হয়।
Agile Process
1) User story আকারে requirement সংগ্রহ।
2) Sprint পরিকল্পনা করা।
3) স্বল্প সময়ে development ও testing।
4) Stakeholder থেকে review ও feedback নেওয়া।
5) পরবর্তী sprint এর জন্য উন্নতি করা।
Agile Method এর সুবিধা
• দ্রুত software delivery সম্ভব।
• Customer সন্তুষ্টি বৃদ্ধি পায়।
• নিয়মিত testing ও feedback এর কারণে risk কমে।
• পরিবর্তনের সাথে সহজে মানিয়ে নেওয়া যায়।
