Chapter 2
Programming Logic and Technique
PU BCA past exam questions
Past questions and answers
58 questions set from this chapter, 5 of them more than once. Most repeated first.
- Asked 2 times
- 2025 Spring · 8 marks
- 2023 Fall · 8 marks
What are the various types of programming techniques? Which technique do you find most significant, and why? Compare them briefly.
Answer
Types of programming techniques
- Unstructured (monolithic) programming: one long sequence of statements using
goto; hard to read and maintain (early BASIC, assembly). - Procedural programming: the program is divided into procedures/functions that operate on shared data; top-down design (C, Pascal, FORTRAN).
- Structured programming: uses only sequence, selection and iteration, avoiding
goto; clear control flow. - Modular programming: the program is split into independent modules with defined interfaces.
- Object-oriented programming (OOP): data and functions are bundled into objects/classes with encapsulation, inheritance, polymorphism and abstraction (C++, Java, Python).
- Functional programming: computation by mathematical functions without side effects (Haskell, Lisp).
- Logic programming: facts and rules, answers by inference (Prolog).
- Event-driven programming: flow decided by events such as clicks (Visual Basic, JavaScript).
Comparison
| Technique | Focus | Data security | Reuse | Suitable for |
|---|---|---|---|---|
| Unstructured | Sequence of steps | None | Poor | Tiny programs |
| Procedural/Structured | Functions, top-down | Low (global data) | Moderate | Medium programs |
| Modular | Independent modules | Moderate | Good | Large programs |
| Object-oriented | Objects, bottom-up | High (encapsulation) | Very high | Large, complex systems |
| Functional/Logic | Functions / rules | High | Good | Maths, AI |
Most significant technique. Object-oriented programming is the most significant because it models real-world entities naturally, hides data through encapsulation, allows reuse through inheritance, supports flexibility through polymorphism, and makes large systems easier to maintain and extend. Most modern software (mobile apps, enterprise systems, games) is built with it.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2025 Spring · 8 marks
- 2025 Spring · 7 marks
- 2023 Fall · 7 marks
Illustrate the two-tier and three-tier architectures in web programming. Which web programming language do you prefer for web app development, and why?
Answer
Two-tier architecture. The application is split into a client tier (user interface and often business logic) and a server tier (database). The client communicates directly with the database server.
[ Client: UI + business logic ] <---SQL---> [ Database server ]
- Simple and fast to develop for small systems; low cost.
- Weakness: business logic on the client makes it hard to maintain, less secure, and poorly scalable (many clients connect directly to the database).
- Example: a desktop application connecting directly to MySQL.
Three-tier architecture. A middle tier is added, giving three layers.
[ Presentation tier: browser/HTML/CSS/JS ]
| HTTP
[ Application (logic) tier: web server + PHP/Java/Node.js ]
| SQL
[ Data tier: database server (MySQL, Oracle) ]
- Presentation tier shows the interface; application tier holds business rules; data tier stores data.
- Advantages: better security (the browser never touches the database), scalability, reusability, easier maintenance as each tier can change independently.
- Disadvantage: more complex and costly to build.
- Example: an online shopping website.
Preferred language: PHP (or equally JavaScript with Node.js). PHP is chosen because it is open source and free, easy to learn, runs on almost every web server and OS, integrates well with MySQL, has frameworks such as Laravel, large community support, cheap hosting, and quick development for dynamic websites. For very large enterprise systems, Java would also be suitable.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2025 Spring · 5 marks
- 2024 Spring · 5 marks
Write short notes on: Requirement of platform independent system
Answer
A platform-independent system is software that can run on different hardware and operating systems (Windows, Linux, macOS, Android) without modification, or with little change.
Why it is required
- Diverse user environments: users have different devices and operating systems, so one product should serve all.
- Reduced cost and effort: one code base avoids developing and maintaining separate versions.
- Wider market reach for the software.
- Easy migration and upgrade when hardware or the OS changes, protecting the investment.
- Internet and distributed computing: programs and web applications must run on any client machine.
- Consistent behavior and easier maintenance and testing.
How it is achieved: high-level languages with compilers for each platform (C), intermediate bytecode and a virtual machine (Java: "write once, run anywhere"), interpreters (Python), and web technologies running in any browser (HTML, JavaScript).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2025 Spring · 8 marks
- 2024 Spring · 8 marks
Draw a context, level 1 and level 2 diagram for online shopping.
Answer
Context diagram (Level 0)
External entities: Customer, Administrator, Payment Gateway/Bank, Delivery Service.
Customer --- registration, login, order, payment info ---> +-------------------+
Customer <-- product info, order confirmation, invoice --- | 0 |
Admin --- product details, price updates -------------> | Online Shopping | --- payment request ---> Payment Gateway
Admin <-- sales reports -------------------------------- | System | <-- payment status ----- Payment Gateway
Delivery <-- delivery details ------------------------------| |
Delivery --- delivery status ---------------------------> +-------------------+
Level 1 DFD
- 1.0 Manage Customer Account (registration/login; store D1 Customer)
- 2.0 Browse and Search Products (reads D2 Product; shows product info)
- 3.0 Manage Cart and Place Order (stores D3 Order)
- 4.0 Process Payment (talks to Payment Gateway; updates D3 Order)
- 5.0 Manage Delivery (sends delivery details to Delivery service; updates order status)
- 6.0 Manage Products and Reports (Admin updates D2 Product; reports from D3)
Customer --details--> (1.0) <--> [D1 Customer]
Customer --search--> (2.0) <--- [D2 Product] ---> product list --> Customer
Customer --selected items--> (3.0) --> [D3 Order]
(3.0) --order total--> (4.0) <--> Payment Gateway ; (4.0) --paid status--> [D3 Order]
[D3 Order] --> (5.0) --delivery details--> Delivery Service
Admin --> (6.0) --> [D2 Product] ; [D3 Order] --> (6.0) --report--> Admin
Level 2 DFD (expansion of process 3.0 Manage Cart and Place Order)
- 3.1 Add/Remove item to cart (reads D2 Product, writes D4 Cart)
- 3.2 Calculate total (reads D4 Cart; applies discount/tax)
- 3.3 Confirm order (writes D3 Order; reduces stock in D2 Product; sends confirmation to Customer)
Customer --item selection--> (3.1 Update Cart) <--> [D4 Cart]
[D2 Product] --price,stock--> (3.1)
[D4 Cart] --cart items--> (3.2 Calculate Total) --order total--> (3.3 Confirm Order)
(3.3) --> [D3 Order] ; (3.3) --stock update--> [D2 Product]
(3.3) --order confirmation--> Customer ; (3.3) --order total--> (4.0 Process Payment)
Inputs and outputs of process 3.0 match those of its level-2 breakdown, so the diagrams are balanced.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- Asked 2 times
- 2023 Fall · 8 marks
- 2024 Spring · 7 marks
Write the importance of Linker and Loader. Explain different types of Linker and Loader.
Answer
Importance
- The linker joins separately compiled object modules and library routines into one executable program, resolves external references, and allows modular development and reuse of libraries.
- The loader places the executable into main memory, allocates space, relocates addresses and starts execution, so that a program can actually run.
Without them, compiled modules could not be combined or executed.
Types of linker
- Static linker: library code is copied into the executable at link time, giving a larger file that is self-contained and needs no external library at run time.
- Dynamic linker: libraries (DLL/shared objects) are linked at load time or run time, giving smaller executables and shared libraries that can be updated independently.
- Linkage editor: produces a relocatable load module that can be loaded later at any address.
Types of loader
- Absolute loader: loads the program at a fixed address given in the object code; simple, but no relocation or linking.
- Relocating loader: adjusts addresses so the program can be loaded at any memory location.
- Direct linking loader: performs linking and relocation, resolving references between modules during loading.
- Bootstrap loader: a small program that loads the operating system when the computer starts.
- Dynamic (run-time) loader: loads routines into memory only when they are called, saving memory.
- Compile-and-go loader: the assembler places machine code directly in memory and executes it; simple but wasteful.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 7 marks
Define program maintenance phase of system development. Write its role in cost reduction in program development? Explain types of program maintenance with their cost factor.
Similar questions: Maintenance role, types, cost (2024 Spring)
Answer
Program maintenance phase is the final phase of system development in which the delivered program is modified, corrected and updated after it has been put into use, so that it continues to meet user needs in a changing environment.
Role in cost reduction
- Correcting faults early and regularly stops small errors from growing into failures that are costly to repair.
- Keeping the program updated extends its useful life, so the organisation does not have to pay to develop a new system.
- Preventive maintenance and good documentation make later changes quicker and cheaper.
- A well-maintained system gives fewer breakdowns, so less operating time and fewer business losses.
Types of maintenance and their cost factor
| Type | Purpose | Cost factor |
|---|---|---|
| Corrective | Fix errors found in use | About 20% of maintenance effort; costs rise sharply if faults are left late |
| Adaptive | Adjust to new hardware, OS, rules | About 20-25%; depends on how much the environment changes |
| Perfective | Add features, improve performance | The largest share, about 50-60%; depends on how many changes users request |
| Preventive | Restructure and improve for the future | Smallest share, about 5%; costs now but reduces future cost |
Overall, maintenance often takes more than half of the total cost of the software life cycle, so careful design, clean code and documentation during development lower this cost.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 8 marks
How does the program maintenance phase of system development play an important role in program development? What is program maintenance? Explain types of program maintenance with their cost factor.
Similar questions: Maintenance and cost reduction (2023 Fall)
Answer
Program maintenance is the modification of a program after delivery to correct faults, adapt it to new conditions and improve it, so that it remains useful.
Importance in program development
- Real use exposes errors that testing missed, and these must be fixed for the system to stay reliable.
- Requirements, hardware, operating systems and laws change, and the program must keep up.
- It extends the useful life of the software, protecting the investment made in development.
- It keeps users satisfied and the organisation running smoothly.
- It often takes more than half of the total life-cycle cost, so managing it well reduces cost.
Types and cost factor
| Type | Meaning | Cost factor |
|---|---|---|
| Corrective | Fixing bugs found after release | Around 20% of effort; costs rise if faults are found late |
| Adaptive | Changing software for new environment (OS, hardware, rules) | Around 20-25%; depends on how much the environment changes |
| Perfective | Adding or improving features and performance at users' request | Largest, around 50%; depends on volume of user change requests |
| Preventive | Restructuring and documenting to avoid future problems | Around 5%; small cost now, saves later |
Good design, clean code and proper documentation lower all of these costs.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 7 marks
What is programming language translator? Explain the working mechanism of Interpreter and how does it act as a bridge between source code and executable software?
Answer
Language translator. A language translator is a system program that converts a program written in one language (usually a high-level or assembly language) into another form (machine code) that the computer's processor can execute. The three types are the assembler (assembly to machine code), the compiler (whole high-level program to machine code) and the interpreter (executes a high-level program statement by statement).
Working mechanism of an interpreter
- It reads one statement (or line) of the source code.
- It checks the syntax of that statement (lexical and syntax analysis).
- If correct, it translates the statement into machine-level actions and executes it immediately.
- It then moves to the next statement. If an error is found, execution stops at that line and the error is reported.
- No separate object file is created; the source must be present (and the interpreter) every time the program runs.
Source code -> [ Interpreter: read -> analyse -> translate -> execute ] -> Output
^ repeated line by line
Interpreter as a bridge. The processor understands only binary machine instructions, while the programmer writes human-readable source code. The interpreter sits between them: it takes each source statement, understands its meaning, and carries out the equivalent machine operations directly. In this way the source code becomes "running software" without a separate compile-and-link step. Because of this, interpreted languages (Python, JavaScript, PHP, BASIC) are easy to debug, interactive and portable, though slower than compiled programs since translation is repeated at every run.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 8 marks
How does program differ from software in terms of structure and functionality? Why it is important to consider the key qualities of good software when designing and developing modern applications?
Answer
Difference between program and software
| Basis | Program | Software |
|---|---|---|
| Structure | A set of instructions written in a programming language to perform one specific task | A collection of programs, data, libraries, configuration and documentation working together |
| Size | Usually small | Usually large and complex |
| Functionality | Performs a single or limited function (e.g. a sorting routine) | Provides complete solutions with many functions (e.g. an accounting system) |
| Development | Written by an individual programmer, little formal process | Developed by a team following SDLC, with analysis, design, testing, maintenance |
| Documentation | Little or none | User manuals, design documents, test reports |
| Interface | Often console based | Usually has a user interface |
| Example | A C program to find a factorial | MS Office, an operating system, a banking system |
Every software contains programs, but a program alone is not software.
Importance of key qualities of good software. Modern applications are used by many people, handle sensitive data and must keep running for years, so quality attributes decide whether they succeed:
- Correctness and reliability: produces correct results and works without failure, which builds user trust.
- Efficiency: uses time, memory and network economically.
- Usability: easy to learn and use, so users adopt it.
- Maintainability: easy to fix and modify, reducing long-term cost.
- Portability and scalability: runs on different platforms and handles growing load.
- Security and integrity: protects data from unauthorized access.
- Reusability and testability: reduces development effort and eases verification.
Considering these qualities during design avoids costly rework, reduces maintenance cost, increases customer satisfaction and gives the product a competitive advantage.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 8 marks
What are the features of Fourth Generation Languages (4GL)? Compare them with Procedure-Oriented Programming.
Answer
Fourth Generation Languages (4GL) are very high-level, non-procedural languages in which the programmer specifies what result is wanted rather than how to obtain it. Examples: SQL, Oracle Forms, FOCUS, report generators, MATLAB.
Features of 4GL
- Non-procedural: the programmer states the goal, not the step-by-step algorithm.
- Very close to natural/English-like language and easy to learn.
- Built-in database access and query facilities (e.g. SQL
SELECT). - Built-in form, screen, report and graphics generators.
- Much less code is needed, so productivity is high and development is fast.
- Machine independent, with few errors and easy maintenance.
- Suited to rapid prototyping and use by non-expert users.
Comparison with procedure-oriented programming (3GL)
| Basis | 4GL | Procedure-oriented (C, Pascal, COBOL) |
|---|---|---|
| Approach | Non-procedural: what to do | Procedural: how to do, step by step |
| Code size | Few lines | Many lines |
| Learning | Easy, even for non-programmers | Needs programming skill |
| Development speed | Very fast | Slower |
| Control over hardware | Little | More control, efficient |
| Execution speed | Generally slower | Faster |
| Data handling | Built-in database support | Needs explicit file/database code |
| Flexibility | Limited to the tool's domain | General purpose |
| Example | SELECT name FROM student WHERE gpa>3.5; | A C program with loops and file handling to do the same |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 8 marks
Explain in detail how high-level programming languages are more beneficial compared to low-level languages. Highlight the major advantages with examples.
Answer
Low-level languages (machine language and assembly) are tied to the hardware, whereas high-level languages (C, Java, Python) use English-like statements. High-level languages are more beneficial for the following reasons.
- Ease of learning and use: statements resemble English and mathematics, e.g.
c = a + b;instead of several assembly instructions such asMOV AX,a,ADD AX,b,MOV c,AX. - Machine independence (portability): the same source can be compiled for different machines, e.g. a Java or C program runs on Windows, Linux or macOS with little or no change. Assembly code works only on one processor family.
- Faster development: one statement replaces many machine instructions, so programs are written quickly and are shorter.
- Easier debugging and maintenance: programs are readable, compilers report errors with messages and line numbers.
- Fewer errors: structured constructs (loops, functions) and data types reduce mistakes; the programmer need not manage registers and memory addresses.
- Rich libraries and abstraction: built-in functions for I/O, math, strings, networking and GUI, e.g.
printf()in C orprint()in Python. - Support for modern paradigms: structured, object-oriented, and functional programming, enabling large and reusable software.
- Lower cost: less programmer time and training.
Low-level languages remain useful for device drivers and embedded systems needing speed and hardware control, but for general application development high-level languages are far more productive.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 7 marks
Prepare a decision table based on income and age conditions to identify tax applied to the employee.
Income Level Age Action Less than Rs.30,000 Under 60 Apply standard tax rate (15%) Less than Rs.30,000 60 or above Apply reduced tax rate for seniors (10%) Between Rs.30,000 to Rs.60,000 Under 60 Apply standard tax rate (20%) Between Rs.30,000 to Rs.60,000 60 or above Apply reduced tax rate for seniors (15%) Above Rs.60,000 Under 60 Apply higher tax rate (30%) Above Rs.60,000 60 or above Apply reduced tax rate for seniors (25%)
Answer
Conditions: C1 = Income level (Low < Rs.30,000; Medium Rs.30,000 to Rs.60,000; High > Rs.60,000), C2 = Age 60 or above (Y/N). Actions: the tax rate to apply.
| Rule | R1 | R2 | R3 | R4 | R5 | R6 |
|---|---|---|---|---|---|---|
| Income < Rs.30,000 | Y | Y | N | N | N | N |
| Income Rs.30,000 to Rs.60,000 | N | N | Y | Y | N | N |
| Income > Rs.60,000 | N | N | N | N | Y | Y |
| Age 60 or above | N | Y | N | Y | N | Y |
| Standard rate 15% | X | |||||
| Senior rate 10% | X | |||||
| Standard rate 20% | X | |||||
| Senior rate 15% | X | |||||
| Higher rate 30% | X | |||||
| Senior rate 25% | X |
Reading the table: for example, an employee earning Rs.45,000 aged 62 satisfies rule R4 and is taxed at 15%; an employee earning Rs.70,000 aged 40 satisfies R5 and is taxed at 30%. The six rules cover all combinations, so the table is complete and has no conflicting rules.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 7 marks
List the steps of the Program Development Life Cycle (PDLC). Explain each briefly.
Answer
The Program Development Life Cycle (PDLC) is the series of steps followed to develop a correct, efficient program.
- Problem definition/analysis: understand the problem, identify inputs, outputs, processing and constraints.
- Program design: plan the solution using algorithms, flowcharts, pseudocode, decision tables and modular structure.
- Coding: translate the design into a programming language following coding standards.
- Testing and debugging: run the program with test data, find syntax, logical and runtime errors and correct them.
- Documentation: prepare the user manual, technical description, comments and test records for future use.
- Implementation (installation): deliver and install the program in the real environment, and train users.
- Maintenance: correct remaining errors, adapt to changes and enhance the program during its life.
Analysis -> Design -> Coding -> Testing/Debugging -> Documentation -> Implementation -> Maintenance
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 7 marks
What is the RAD model in software development? Mention its features, advantages, and limitations.
Answer
Rapid Application Development (RAD) is an incremental software development model that emphasizes very short development cycles (typically 60 to 90 days) by using component-based construction, prototyping and heavy user involvement. A fully functional system is built by several teams working in parallel on separate modules.
Phases: business modeling, data modeling, process modeling, application generation (using reusable components and code generators), and testing and turnover.
Features
- Short development time and parallel work by multiple teams.
- Active user participation and quick feedback.
- Reuse of existing components and use of automated tools.
- Modular design; prototypes refined iteratively.
Advantages
- Fast delivery and reduced development time.
- Easy incorporation of changes and early user feedback.
- Reusability lowers effort and errors.
- Better user satisfaction and early risk detection.
Limitations
- Needs a large number of skilled developers for the teams.
- Requires committed users and developers; fails if either lacks commitment.
- Only suitable for systems that can be modularized.
- Not suitable for high technical risk or very large, complex systems.
- Costly because of automated tools and code generators.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 8 marks
Explain the concept of Data Flow Diagram (DFD) in system modeling. Discuss its core elements, purpose and the essential rules that must be followed while designing a DFD.
Answer
Concept. A Data Flow Diagram (DFD) is a graphical tool of structured analysis that shows how data moves through a system: where it comes from, how it is processed, where it is stored and where it goes. It models the system's functions, not the control or timing.
Core elements
| Element | Symbol (Yourdon/DeMarco) | Meaning |
|---|---|---|
| Process | Circle (or rounded rectangle) | Transforms input data into output |
| Data flow | Arrow with label | Movement of data between components |
| Data store | Open-ended rectangle / two parallel lines | Place where data is held (file, database) |
| External entity | Rectangle | Source or destination outside the system (customer, bank) |
Purpose
- Gives a clear, simple picture of the system for users and analysts.
- Helps identify requirements and functional decomposition.
- Supports communication between technical and non-technical people.
- Helps find redundancy, missing processes and flaws before design.
- Serves as documentation of the system.
DFDs are drawn in levels: context diagram (level 0), level 1, level 2 and so on, each giving more detail (leveling).
Rules for designing a DFD
- Every process must have at least one input and one output (no miracles, no black holes).
- Data cannot flow directly between two external entities, or between two data stores; it must pass through a process.
- Data cannot flow directly between an external entity and a data store; a process must intervene.
- Every data flow must be labeled with a meaningful noun, and every process with a verb phrase and a unique number.
- Data stores and entities must be named; a process cannot have the same name as another.
- Data flows should show data, not control signals.
- Balancing: inputs and outputs of a parent process must match those of its child diagram.
- Avoid crossing lines and keep the diagram readable, with a manageable number of processes (about 7 plus or minus 2) per diagram.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 8 marks
Draw a level-0 and level-1 DFD for student information system.
Answer
Level-0 DFD (context diagram)
External entities: Student, Teacher/Faculty, Administrator. The whole system is a single process "0 Student Information System".
Student ----- registration details, fee payment ------>+-------------------+
Student <---- ID card, result, fee receipt ------------| |
Teacher ----- marks, attendance ----------------------->| 0 |
Teacher <---- class list, student reports -------------| Student Information|
Admin ----- admission data, course/user setup ------->| System |
Admin <---- reports, statistics ----------------------| |
+-------------------+
Level-1 DFD
Processes and data stores:
- 1.0 Admission and Registration (input: registration details from Student, admission data from Admin; output: student record to D1 Student file)
- 2.0 Course and Class Management (reads D1; stores to D2 Course file; sends class list to Teacher)
- 3.0 Attendance and Examination (input: marks, attendance from Teacher; stores to D3 Attendance/Result file)
- 4.0 Fee Management (input: fee payment from Student; stores to D4 Fee file; sends receipt to Student)
- 5.0 Report Generation (reads D1, D3, D4; outputs result, reports to Student, Teacher and Admin)
Student --registration--> (1.0 Admission) --student record--> [D1 Student]
Admin --course info --> (2.0 Course Mgmt) <--> [D2 Course]; --class list--> Teacher
Teacher --marks/attend--> (3.0 Attendance & Exam) --> [D3 Result]
Student --fee payment --> (4.0 Fee Mgmt) --> [D4 Fee]; --receipt--> Student
[D1],[D3],[D4] --> (5.0 Report Generation) --result/reports--> Student, Teacher, Admin
The flows at level 1 balance with the context diagram, since all inputs and outputs of the entities are the same.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 7 marks
- 2025 Spring · 7 marks
What are the cost-related challenges in program maintenance? Give real-life software examples.
Answer
Program maintenance (corrective, adaptive, perfective and preventive) is often the most expensive part of the software life cycle, commonly 60 to 70% of total cost.
Cost-related challenges
- Poor documentation and code quality: developers spend much time understanding old code, raising effort and cost.
- Staff turnover: original developers leave, and new staff need training and time.
- Changing requirements and technology: adapting to new operating systems, hardware, laws or user needs requires repeated modification.
- Ripple effect: a small change can break other modules, requiring regression testing.
- Legacy systems: old languages and platforms need rare skills and special tools; replacing them is also costly.
- Bug fixing after release: errors found late cost far more to fix than if found during development.
- Licensing, hosting, support and security patching: continuing operational costs.
- Lack of regression test suites and configuration management: each release needs extra verification effort.
Real-life examples
- Banking and ATM software in COBOL: banks pay large sums to maintain legacy mainframe systems because few programmers know COBOL.
- Microsoft Windows: continuous security patches and compatibility updates (e.g. support for Windows 7/XP) require large dedicated teams.
- Y2K problem: two-digit year fields forced huge worldwide expenditure to modify old programs.
- Mobile apps (e.g. WhatsApp, banking apps): must be updated for every new Android/iOS version, adding recurring cost.
Good design, documentation, modular code and testing during development reduce these maintenance costs.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 7 marks
What is web-based programming architecture? Explain in detail with examples of commonly used web programming languages and their applications.
Answer
Web-based programming architecture is the structure used to build applications that run on a web server and are accessed by users through a web browser over the Internet or an intranet, using the HTTP protocol. It follows the client-server model, usually in two or three tiers.
Components
- Client (browser): sends HTTP requests and renders HTML, CSS and JavaScript responses.
- Web server: (Apache, Nginx, IIS) receives requests and passes dynamic ones to the application.
- Application/server-side scripts: process logic, authenticate users, and generate pages.
- Database server: stores and retrieves data.
Browser --request--> Web server --> Server-side script --> Database
Browser <--HTML response-- Web server <-- result <--------- Database
Commonly used web programming languages and applications
| Language | Type | Typical use |
|---|---|---|
| HTML | Markup | Structure of web pages |
| CSS | Style | Layout and design |
| JavaScript | Client side (and Node.js server side) | Interactive pages, SPAs, validation |
| PHP | Server side | Dynamic websites, CMS such as WordPress, e-commerce |
| Java (JSP/Servlets, Spring) | Server side | Enterprise and banking applications |
| Python (Django, Flask) | Server side | Web apps, data-driven and AI sites |
| ASP.NET (C#) | Server side | Corporate Windows-based applications |
| Ruby (Rails) | Server side | Start-up web applications |
| SQL | Query | Database access |
Advantages of web architecture: platform independence, no installation, centralized update and maintenance, and wide accessibility.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 8 marks
Draw a flowchart and write a pseudocode to check whether a number is even or odd.
Answer
Pseudocode
START
INPUT number
IF number MOD 2 = 0 THEN
PRINT "Even"
ELSE
PRINT "Odd"
END IF
STOP
Flowchart
( Start )
|
[ Input number ]
|
< number mod 2 = 0 ? >
|Yes |No
[ Print "Even" ] [ Print "Odd" ]
| |
+-----+------+
|
( Stop )
A number is even if the remainder on division by 2 is 0; otherwise it is odd. For example, 10 mod 2 = 0 gives Even, and 7 mod 2 = 1 gives Odd.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 5 marks
Write short notes on: Programming language's analogy with natural language
Answer
A programming language is analogous to a natural language such as English or Nepali, because both are means of communication governed by rules.
| Natural language | Programming language |
|---|---|
| Alphabet and characters | Character set |
| Words | Keywords, identifiers, tokens |
| Grammar (syntax) | Syntax rules of the language |
| Sentences | Statements |
| Meaning (semantics) | Semantics: what a statement does |
| Paragraphs, essays | Functions, modules, programs |
| Communication between people | Communication between programmer and computer |
| Dialects/variants | Versions and dialects (e.g. C, C++) |
Just as a sentence with wrong grammar is misunderstood, a statement with a syntax error is rejected by the compiler. The difference is that programming languages are formal, precise and unambiguous, with a small vocabulary, while natural languages are ambiguous and evolving.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 5 marks
Write short notes on: Prototyping Model
Answer
The Prototyping model is a software development model in which a working sample (prototype) of the system is built quickly, shown to the users, and refined repeatedly until the requirements are satisfied. It is useful when requirements are unclear.
Steps
- Requirement gathering (initial, rough).
- Quick design (focus on the visible user interface).
- Build the prototype.
- User evaluation and feedback.
- Refine the prototype and repeat steps 3 to 4 until accepted.
- Develop the final product (the prototype may be discarded or evolved) and maintain it.
Requirements -> Quick design -> Build prototype -> User evaluation
^ |
+------------------ refine <-----------------------+ -> Final system
Advantages: clarifies requirements, early user involvement, reduces risk and misunderstanding, errors found early. Disadvantages: may encourage poor design for speed, users may mistake the prototype for the final product, can increase cost and time if there are too many iterations, documentation is often weak.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 5 marks
What is a programming language? Compare high-level and low-level languages.
Answer
A programming language is a formal language, with a defined syntax and semantics, used to write instructions that tell a computer how to perform tasks. Programs written in it are translated into machine code for execution.
| Basis | High-level language | Low-level language |
|---|---|---|
| Closeness | Close to human language | Close to machine/hardware |
| Ease | Easy to learn, read and write | Difficult, needs hardware knowledge |
| Portability | Machine independent | Machine dependent |
| Translator | Compiler or interpreter | Assembler (assembly) or none (machine) |
| Execution speed | Slower (translation overhead) | Faster, efficient |
| Memory control | Little direct control | Direct control of registers and memory |
| Debugging | Easy | Hard |
| Development time | Short | Long |
| Examples | C, Java, Python | Machine language, assembly |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 5 marks
Why are 4GL languages popular in modern programming? Highlight their key features and justify your answer.
Answer
4GLs such as SQL, report generators and form builders are popular because they raise programmer productivity and let even non-experts build applications.
Key features
- Non-procedural: specify what is wanted, not how to compute it.
- English-like, easy to learn and use.
- Built-in database, query, report, form and graphics tools.
- Very few lines of code needed.
- Machine independent and easy to maintain.
Justification for popularity
- Fast development: applications are built in a fraction of the time of 3GLs, which suits rapid prototyping and changing business needs.
- Lower cost: less coding, fewer programmers and fewer errors.
- End-user friendly: managers and analysts can write queries (e.g.
SELECT * FROM sales WHERE year=2025;) without deep programming knowledge. - Data-centred world: modern systems revolve around databases and reports, which 4GLs handle directly.
- Easy maintenance because the code is short and readable.
Hence they are widely used in business, data analysis and web/database applications, even though they are less efficient than 3GLs for system programming.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 5 marks
What are the types of programming language translators? Why are they necessary? Explain with examples.
Answer
A language translator converts programs written in one language into machine language so that the computer can execute them.
Types
- Assembler: converts assembly language into machine code (e.g. MASM, NASM).
- Compiler: translates the entire high-level program into machine code (an object/executable file) at once, then reports all errors; execution is fast (e.g. C, C++ compilers).
- Interpreter: translates and executes the program one statement at a time, stopping at the first error; slower but easy for debugging (e.g. Python, JavaScript, BASIC).
(Other kinds include the preprocessor, cross-compiler and decompiler.)
Why they are necessary: the CPU understands only binary machine instructions, whereas programmers write in assembly or high-level languages that are easy for humans. A translator bridges this gap, checks syntax errors, makes programs portable across machines, and relieves programmers from writing machine code.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 7 marks
Describe the role of linker and loader in the compilation process of a computer program.
Answer
Source code passes through these stages: editor, preprocessor, compiler, assembler, linker, loader, execution.
Source -> Compiler -> Object code -> Linker (+ libraries, other objects) -> Executable -> Loader -> Memory -> Execution
Linker. A linker combines one or more object files produced by the compiler together with library routines (e.g. printf from the standard C library) into a single executable file. Its tasks are:
- Resolving external references (symbols defined in other modules or libraries).
- Relocating and assigning final addresses to code and data sections.
- Merging separate modules into one executable.
Example: main.o + math.o + libc gives a.out/program.exe.
Loader. The loader is the part of the operating system that loads the executable file from disk into main memory and prepares it to run. Its tasks are:
- Allocating memory space for the program.
- Loading code and data into memory.
- Relocating addresses if the program is loaded at a different base address.
- Setting up registers and the stack, then transferring control to the program's entry point.
In short, the linker produces the complete executable, and the loader places it in memory and starts execution.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 8 marks
Describe the importance of requirement analysis in software development. How does it affect the success of a project?
Answer
Requirement analysis is the phase in which the needs of users and stakeholders are collected, studied, documented and validated before design begins. The result is usually a Software Requirement Specification (SRS).
Importance
- Foundation of the project: design, coding and testing all depend on the requirements; errors here spread to every later phase.
- Clear understanding: gives developers and clients a common agreement on what will be built.
- Reduces cost: an error found in requirements costs far less to fix than one found after delivery.
- Accurate estimation and planning of time, cost, resources and risks.
- Scope control: avoids scope creep and later disputes.
- Basis for testing and acceptance: test cases and acceptance criteria are derived from requirements.
- Feasibility check: identifies technical, economic and operational feasibility early.
- Better quality and maintainability through unambiguous documentation.
Effect on project success. Studies show that most project failures (late delivery, cost overruns, unused features) arise from incomplete or incorrect requirements. Thorough analysis ensures the product meets user needs, is delivered on time and within budget, keeps customers satisfied and reduces rework. Poor analysis leads to the wrong product and project failure.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 7 marks
Write an algorithm to find the sum of an arithmetic series and represent it with a flowchart.
Answer
For an arithmetic series with first term , common difference and terms, the sum is
Algorithm
- Start.
- Read , and .
- Compute .
- Print .
- Stop.
Check: for , , the terms are 2, 5, 8, 11, 14 with sum 40, and the formula gives .
Flowchart
( Start )
|
[ Read a, d, n ]
|
[ S = n/2 * (2*a + (n-1)*d) ]
|
[ Print S ]
|
( Stop )
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 8 marks
Do you agree that SDLC is vital for effective program design and development? Support your answer with reasons.
Answer
Yes, I agree that the Software Development Life Cycle (SDLC) is vital for effective program design and development. SDLC is a structured framework of phases: planning, requirement analysis, design, coding/implementation, testing, deployment and maintenance.
Reasons
- Systematic approach: gives a clear roadmap, so work proceeds in an orderly way instead of ad hoc coding.
- Better planning and control: cost, time, resources and risks can be estimated, monitored and managed.
- Quality assurance: each phase has verification and testing, producing fewer defects.
- Clear requirements: early analysis ensures the product matches user needs.
- Reduced cost and rework: defects found early are cheaper to fix.
- Documentation: every phase produces documents, easing maintenance and knowledge transfer.
- Team coordination: defines roles and deliverables, helping large teams work together.
- Customer satisfaction and visibility: stakeholders can review progress at milestones.
- Maintainability: well-structured, documented software is easy to modify.
Without SDLC projects often exceed budget and deadlines and deliver poor-quality software. Different models (waterfall, spiral, RAD, agile) can be chosen to suit the project, but following some life-cycle process is essential.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 8 marks
Write the different models of program development and describe RAD model of development in details with diagram.
Answer
Models of program development
- Waterfall (classical life cycle) model
- Prototyping model
- Spiral model
- Incremental model
- RAD (Rapid Application Development) model
- V-model
- Iterative/Agile models (Scrum, XP)
RAD model. RAD is an incremental model built around very short development cycles (60 to 90 days). It uses reusable components, prototypes, automated tools and parallel development by several teams, with continuous user involvement.
Phases
- Business modeling: information flow among business functions is modeled.
- Data modeling: data objects needed are defined with their attributes and relationships.
- Process modeling: data objects are transformed into processes to add, modify, delete and retrieve data.
- Application generation: the system is built using automated tools, fourth-generation techniques and reusable components.
- Testing and turnover: reused components are already tested; new components and interfaces are tested before delivery.
Team 1: Business -> Data -> Process -> Application generation -> Testing & turnover
Team 2: Business -> Data -> Process -> Application generation -> Testing & turnover (parallel)
Team 3: Business -> Data -> Process -> Application generation -> Testing & turnover
\________ 60 - 90 days ________/ -> Integrated system
Advantages: fast delivery, reuse, early feedback, easy change. Limitations: needs many skilled people and committed users, works only for modular systems, unsuitable for high technical risk.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 7 marks
What is cohesion in software design? Explain its types and discuss why high cohesion is preferred in modular programming.
Answer
Cohesion is the degree to which the elements within a single module belong together, i.e. how strongly related and focused the module's tasks are. It is a measure of the internal strength of a module.
Types (from weakest to strongest)
- Coincidental: unrelated tasks grouped arbitrarily (e.g. a "Utilities" module with printing, date and sorting routines).
- Logical: tasks are logically similar but different in nature, selected by a flag (e.g. one module handling all kinds of input).
- Temporal: tasks performed at the same time (e.g. an initialization module).
- Procedural: tasks that follow a particular sequence of execution.
- Communicational: tasks operate on the same input or output data.
- Sequential: output of one task is the input to the next.
- Functional: all elements contribute to a single well-defined task (e.g.
calculateTax()). This is the best type.
Why high cohesion is preferred in modular programming
- Modules are easier to understand because each does one job.
- Easier to maintain and modify; changes stay inside one module.
- Promotes reusability.
- Less coupling between modules, reducing the ripple effect.
- Easier to test and debug, so fewer errors and higher reliability.
- Supports team development by assigning clear responsibilities.
Good design therefore aims for high cohesion and low coupling.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 8 marks
What do you mean by Standalone and Client-Server programming? Is Client-Server programming better than Standalone programming? If yes, explain how?
Answer
Standalone programming. A standalone application is installed and runs completely on a single computer, with its own user interface, logic and data; it needs no network (e.g. MS Paint, a calculator, a desktop word processor).
Client-Server programming. The application is divided into a client (requests services, handles the interface) and a server (provides services such as data, files or processing) that communicate over a network (e.g. web browsers and web servers, email, online banking).
Client 1 \
Client 2 --- network --- Server (database / application logic)
Client 3 /
Is client-server better than standalone? Yes, for multi-user and data-sharing applications, because:
- Data sharing and centralization: one central database is shared by many users, avoiding inconsistent copies.
- Easy maintenance and update: changes are made once on the server.
- Security: data and access control are centralized and can be protected and backed up.
- Scalability: more clients or stronger servers can be added.
- Resource sharing: expensive hardware, printers and storage are shared.
- Remote access from anywhere and from different platforms.
- Better backup and recovery.
Drawbacks: needs a network, server failure affects all users, and setup is costlier. Standalone programs remain better for single-user, offline, simple tasks, but for modern shared applications client-server is superior.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 5 marks
Write short notes on: Input design
Answer
Input design is the process of converting user-oriented input into a computer-based format so that data enters the system accurately, quickly and easily. Good input design reduces errors and effort.
Objectives
- Capture accurate data with minimum errors.
- Keep the input volume small and avoid unnecessary data.
- Make data entry easy, fast and user-friendly.
- Ensure data security and validity.
Input media and methods: keyboard forms, barcode and card readers, OCR/OMR, touch screens, and web forms.
Design guidelines
- Logical grouping of fields and a clear, consistent layout.
- Labels, default values, drop-down lists and radio buttons.
- Input validation: type, range, length, format and mandatory checks.
- Helpful error messages and confirmation.
- Use of codes and auto-completion to reduce typing.
- Source documents (paper forms) designed clearly with instructions.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 5 marks
Write short notes on: 3GL vs 4GL
Answer
| Basis | 3GL | 4GL |
|---|---|---|
| Nature | Procedural: how to do the task | Non-procedural: what is wanted |
| Examples | C, C++, Java, COBOL, Pascal | SQL, Oracle Forms, FOCUS, report generators |
| Code size | Many lines | Few lines |
| Skill required | Trained programmers | Even non-programmers/end users |
| Development speed | Slower | Much faster |
| Database/report/GUI support | Through libraries and extra code | Built in |
| Hardware control | Good control | Little control |
| Execution efficiency | Faster and efficient | Generally slower, uses more resources |
| Flexibility | General purpose | Limited to specific domains (database, reports) |
| Translator | Compiler/interpreter | Interpreter/code generator |
3GLs are best for system and general-purpose software, and 4GLs for rapid, data-centred business applications.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2025 Spring · 5 marks
Write short notes on: Modular Programming
Answer
Modular programming is a technique in which a large program is divided into small, independent, self-contained units called modules (functions, procedures, packages or files), each performing one specific task, and which are combined to form the complete program.
Features: top-down decomposition, well-defined interfaces, information hiding, high cohesion within modules and low coupling between them.
Advantages
- Easier to design, understand and debug.
- Modules can be reused in other programs.
- Team members can develop modules in parallel.
- Easy maintenance and modification, as changes are localised.
- Easier testing (unit testing).
Disadvantages: careful design of interfaces is required, and extra overhead for module calls and integration.
Main program
|-- Input module
|-- Process module
|-- Output module
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 8 marks
Why Program Language Translator is required? Write the difference between Low Level Language and High Level Language.
Answer
Why a language translator is required. A computer's processor can execute only machine language (binary 0s and 1s). Programmers, however, write in assembly or high-level languages that are easy for humans to read. A language translator (assembler, compiler or interpreter) converts these programs into machine code. It also detects syntax errors and makes programs independent of the machine details, so it is essential for using any language other than machine language.
Difference between low-level and high-level languages
| Basis | Low-level language | High-level language |
|---|---|---|
| Closeness | Close to hardware | Close to human language |
| Types | Machine and assembly language | Procedural, object-oriented, 4GL languages |
| Portability | Machine dependent | Machine independent |
| Ease | Difficult to learn and write | Easy to learn, read and write |
| Translator | Assembler (none for machine language) | Compiler or interpreter |
| Execution speed | Fast | Comparatively slower |
| Memory efficiency | Highly efficient | Less efficient |
| Hardware access | Direct | Limited |
| Debugging/maintenance | Hard | Easy |
| Examples | Machine code, 8085 assembly | C, Java, Python |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 7 marks
What is called Machine Independent Program? Write the advantages of 4GL over 3GL.
Answer
Machine independent program. A program that can be compiled or run on different types of computers and operating systems without changing its source code (or with only minor changes) is called machine independent, or portable. High-level languages are machine independent, e.g. a standard C or Java program runs on any machine having a suitable compiler or virtual machine, unlike assembly programs, which depend on one processor.
Advantages of 4GL over 3GL
- Shorter code: a few statements replace pages of 3GL code.
- Faster development and higher productivity.
- Non-procedural: only the result is described, not the algorithm.
- Easier to learn and use, even by end users with no programming skill.
- Built-in features: database access, report, form and graphics generators.
- Fewer errors and easier maintenance because there is less code.
- Lower development cost and effort.
- Suitable for rapid prototyping and changing requirements.
- More machine independent, and closer to natural language.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 7 marks
Differentiate between high-level language over low-level language.
Answer
| Basis | High-level language | Low-level language |
|---|---|---|
| Definition | Language close to human language, independent of hardware | Language close to the machine's instruction set |
| Examples | C, C++, Java, Python | Machine language, assembly language |
| Ease of use | Easy to learn, write, read and understand | Difficult; needs knowledge of registers and architecture |
| Portability | Machine independent | Machine dependent |
| Translator needed | Compiler or interpreter | Assembler (assembly); none for machine language |
| Execution speed | Slower, because of translation overhead | Faster |
| Memory usage | More | Less, efficient |
| Hardware control | Little | Direct control |
| Debugging | Easy, with error messages | Difficult |
| Development time and cost | Less | More |
| Statements | One statement gives many machine instructions | One statement corresponds to one machine instruction |
| Use | Application software, web, general programs | Device drivers, embedded and system software |
Hence high-level languages are preferred for most applications, while low-level languages are used where speed and hardware access are critical.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 8 marks
Which phase of SDLC is the more important in what context of good program design and development? Discuss with logic.
Answer
All SDLC phases (planning, requirement analysis, design, coding, testing, deployment, maintenance) are needed, but the requirement analysis phase is the most important for good program design and development.
Logic
- Everything depends on it: design, code and test cases are derived from the requirements. If they are wrong, a perfectly coded program still solves the wrong problem.
- Cost of errors grows with time: an error in requirements that is found during maintenance can cost 50 to 100 times more to fix than if it is found in the analysis phase.
- Defines the scope: time, budget and resources can only be estimated accurately when the requirements are known.
- Reduces rework and change requests, preventing delays and overruns.
- Common understanding: the SRS gives users, analysts and developers one agreed document.
- Basis for acceptance: the product is judged successful if it meets these requirements.
- Feasibility study identifies risks early and avoids doomed projects.
Many project failures are caused by unclear or changing requirements rather than coding problems. The design phase is a close second, since the architecture strongly influences quality and maintainability, but design can only be as good as the requirements it is built on. Therefore thorough requirement analysis is the key to successful design and development.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 7 marks
Create a decision table to determine the eligibility of students for a scholarship based on their academic performance and financial need. Consider the following conditions:
- GPA >= 3.70 and annual family income is Low (< $30,000) provides 100% scholarship
- GPA >= 3.70 and annual family income is Moderate (60,000) provides 75% scholarship
- GPA >= 3.70 and annual family income is high (more than $60,000) provides 50% scholarship
- GPA >= 3.50 and annual family income is Low (< $30,000) provides 75% scholarship
- GPA >= 3.50 and annual family income is Moderate (60,000) provides 50% scholarship
- For other cases there is no scholarship
Answer
Conditions: C1 = GPA >= 3.70; C2 = GPA >= 3.50 (and < 3.70); C3 = Income Low (< 30,000 to 60,000). Actions: scholarship percentage.
| Rule | R1 | R2 | R3 | R4 | R5 | R6 |
|---|---|---|---|---|---|---|
| GPA >= 3.70 | Y | Y | Y | N | N | Else |
| GPA >= 3.50 (below 3.70) | N | N | N | Y | Y | Else |
| Income Low (< $30,000) | Y | N | N | Y | N | - |
| Income Moderate (60,000) | N | Y | N | N | Y | - |
| Income High (> $60,000) | N | N | Y | N | N | - |
| 100% scholarship | X | |||||
| 75% scholarship | X | X | ||||
| 50% scholarship | X | X | ||||
| No scholarship | X |
Rule R6 (else) covers all remaining cases, i.e. GPA below 3.50, or GPA between 3.50 and 3.70 with High income. Example: a student with GPA 3.80 and income 45,000 matches R5 and gets 50%.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 7 marks
List down all the programming models. Prototyping model is widely used programming model. Yes or No. Discuss.
Answer
Programming (software development) models
- Waterfall (classical) model
- Prototyping model
- Spiral model
- Incremental model
- RAD model
- V-model
- Iterative and Agile models (Scrum, XP)
Is prototyping widely used? Yes. The prototyping model builds a quick working sample of the system, obtains user feedback, and refines it until the requirements are right.
Reasons for wide use
- Many users cannot state their requirements clearly at the start; a prototype makes them concrete.
- Early user involvement leads to higher satisfaction and acceptance.
- Misunderstandings and errors are found early, reducing costly rework.
- User interfaces, which are visible and subjective, are best evaluated by trying them.
- Supported by modern tools (GUI builders, 4GLs, Figma), so prototypes are cheap and quick to produce.
- It is the basis of other popular approaches: RAD, spiral and agile iterations.
Limitations: poor quality may carry into the final product, too many iterations raise cost and time, users may think the prototype is the finished system, and documentation is often neglected. It is not ideal for very large, well-defined or safety-critical systems, where waterfall or spiral is better.
Overall, prototyping (alone or combined with iterative/agile methods) is widely used, especially where requirements are unclear or the interface is important.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 7 marks
Why program maintenance is used in program development? Explain different types of Program maintenance.
Answer
Program maintenance is the last phase of the program development life cycle. It is needed because a program does not stop changing once it is delivered. Errors that escaped testing appear in real use, user requirements change, the hardware, operating system and laws around the program change, and the program must keep running efficiently. Without maintenance the software becomes unreliable and obsolete, and the investment made in developing it is wasted.
Types of program maintenance
(a) Corrective maintenance: Fixing faults (bugs) found after delivery, such as wrong calculations, crashes or logic errors that testing missed.
(b) Adaptive maintenance: Modifying the program so that it keeps working when its environment changes, for example a new operating system version, new hardware, a changed tax rate or a new government regulation.
(c) Perfective maintenance: Improving or extending the program at the users' request, for example adding new features, improving the user interface or making it faster.
(d) Preventive maintenance: Changing the program to prevent future problems and make it easier to maintain, such as restructuring code, improving documentation and removing code that is likely to cause errors.
Together these keep the software useful, correct and up to date throughout its life.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 8 marks
Write the importance of Documentation. Draw context diagram and level 1 DFD for Library Management System.
Answer
Importance of documentation
- It records how the system is designed, coded and used, so it can be understood without the original developers.
- It makes maintenance and modification easier and cheaper.
- It helps users learn to operate the system through manuals and help guides.
- It supports communication between analysts, programmers, testers and clients.
- It provides evidence of requirements and agreed design, which helps in testing, audit and training.
Context diagram (Level 0) of Library Management System
Member --membership request, book request--> +---------------------+ --book issue, receipt--> Member
<--book, fine notice---------------- | Library Management |
| System |
Librarian --book details, member details--> | | --reports--> Librarian
+---------------------+
Supplier <--purchase order-- (system) <--new books-- Supplier
The whole system is one process with external entities Member, Librarian and Supplier.
Level 1 DFD
Member --request--> (1.0 Manage Membership) <--> [D1 Member file]
Member --book request--> (2.0 Issue Book) --> [D3 Issue file]
(2.0) <--> [D2 Book file]
Member --returned book--> (3.0 Return Book & Calculate Fine) <--> [D3 Issue file]
(3.0) --fine--> Member
Librarian --new book details--> (4.0 Manage Books) --> [D2 Book file]
(4.0) --purchase order--> Supplier
[D1], [D2], [D3] --> (5.0 Generate Reports) --reports--> Librarian
Processes: 1.0 Manage Membership, 2.0 Issue Book, 3.0 Return Book and Calculate Fine, 4.0 Manage Books, 5.0 Generate Reports. Data stores: D1 Member, D2 Book, D3 Issue/Return.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 7 marks
Explain the client-server programming concept with the help of diagram.
Answer
Client-server programming is a model in which the work of an application is divided between two kinds of programs. A server provides a service or resource (data, files, processing) and waits for requests. A client is the user-facing program that sends requests to the server and shows the result. They communicate over a network using a request-response protocol.
+----------+ +----------+
| Client 1 | --- request ---------> | | +----------+
+----------+ <--- response -------- | Server | <--> | Database |
+----------+ | | +----------+
| Client 2 | --- request ---------> | |
+----------+ <--- response -------- +----------+
Working
- The client sends a request, such as a query for data.
- The server receives it, processes it (for example, runs the query on the database).
- The server sends the response back and the client displays it.
Features
- Data and business logic are kept centrally on the server, so they are easier to secure, back up and update.
- Many clients can share one server at the same time.
- Clients and server can run on different machines and be upgraded independently.
Examples: web browser and web server, email client and mail server, database client and database server.
Common forms are two-tier (client and database server) and three-tier (client, application server, database server).
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 8 marks
Explain various types of mobile computing languages.
Answer
Mobile computing languages are the programming languages used to build applications for mobile devices such as smartphones and tablets. The main types are:
(a) Native languages: Used for one specific platform and give the best performance and full access to device features.
- Java and Kotlin for Android apps (Kotlin is now the preferred language).
- Swift and Objective-C for iOS apps.
(b) Cross-platform languages and frameworks: One code base runs on several platforms, saving time and cost.
- Dart with Flutter
- JavaScript with React Native
- C# with Xamarin
(c) Web-based (hybrid) languages: Apps are written with web technologies HTML, CSS and JavaScript and wrapped in a native container (Apache Cordova, Ionic), or run in the browser as web apps. They are easy to build but slower than native apps.
(d) Markup languages for mobile: WML (Wireless Markup Language) with WAP was used on early phones; XHTML Mobile Profile and HTML5 are used now. Layouts in Android are also described with XML.
(e) Scripting and other languages: Python (Kivy), Lua and C/C++ (through the NDK, often for games) are used in specific cases.
The choice depends on performance needs, target platforms, development time and cost.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 5 marks
Write short notes on: Feasibility study
Answer
A feasibility study is a preliminary investigation done at the start of system development to decide whether the proposed project is practical and worth carrying out. It is done before large resources are spent, and its result is a feasibility report that helps management approve, change or reject the project.
Types of feasibility
- Technical feasibility: Whether the required hardware, software and technical skills are available or can be obtained.
- Economic feasibility: Whether the benefits outweigh the costs (cost-benefit analysis).
- Operational feasibility: Whether the system will be accepted and used by the people in the organisation and fit its working methods.
- Legal feasibility: Whether the project follows laws, licences and regulations.
- Schedule feasibility: Whether the project can be finished in the time available.
A good study avoids wasted cost on a project that cannot succeed.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 5 marks
Write short notes on: Cohesion and coupling
Answer
Cohesion is the degree to which the elements inside a single module belong together and perform one well-defined task. High cohesion is desirable. Types, from best to worst: functional, sequential, communicational, procedural, temporal, logical, coincidental.
Coupling is the degree of dependence between different modules. Low coupling is desirable, because a change in one module then affects others little. Types, from loosest to tightest: data, stamp, control, external, common, content coupling.
A good design therefore has high cohesion and low coupling. This makes modules easier to understand, test, reuse and maintain.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2023 Fall · 5 marks
Write short notes on: Impacts of software errors
Answer
Software errors (bugs) are faults in a program that make it produce wrong results or behave unexpectedly. Their impacts can be serious:
- Financial loss: wrong billing, banking or stock calculations cost money, and fixing errors late in the life cycle is expensive.
- Loss of data: errors can corrupt or delete important data.
- Safety risks: errors in medical, aviation, vehicle or industrial control software can injure or kill people. Examples include the Ariane 5 rocket failure (1996) and the Therac-25 radiation overdoses.
- Loss of reputation and users: unreliable software loses customer trust and market share.
- Security weaknesses: bugs such as buffer overflows can be exploited by attackers.
- Project delay and higher maintenance cost: time is spent debugging and re-testing instead of building new features.
- Legal consequences: the organisation may face lawsuits or penalties.
For these reasons careful design, coding standards, reviews and thorough testing are necessary.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 7 marks
Explain different Program Language Translator. Write advantages and disadvantages of High Level Language.
Answer
A language translator is a program that converts source code written in a programming language into machine code the computer can execute. There are three types.
(a) Assembler: Converts assembly language (mnemonics such as ADD, MOV) into machine code.
(b) Compiler: Translates the whole high-level program into machine code (an object/executable file) in one go and reports all errors together. Execution is fast afterwards, and the source code is not needed to run it. Examples: C, C++.
(c) Interpreter: Translates and executes the program one statement at a time. It stops at the first error, which makes debugging easy, but execution is slower. Examples: Python, JavaScript, BASIC.
Advantages of high-level language
- Close to English and mathematics, so easy to learn, read and write.
- Machine independent (portable) across different computers.
- Programs are shorter and faster to develop.
- Easier to debug and maintain.
- Rich libraries and structures help build complex programs.
Disadvantages
- Needs a compiler or interpreter, so translation takes time.
- Programs run slower and use more memory than machine or assembly code.
- Less direct control over hardware.
- Cannot easily do low-level tasks such as direct hardware access.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 8 marks
Define the generation of high-level language. Discuss with suitable example. Write the characteristics of 4GL.
Answer
Programming languages are grouped into generations. The high-level generations are:
- First generation (1GL): Machine language of 0s and 1s. Fastest but very hard to write.
- Second generation (2GL): Assembly language using mnemonics, for example
ADD A, B. - Third generation (3GL): Procedural high-level languages close to English, translated by compilers or interpreters. Examples: FORTRAN, COBOL, C, Pascal, Java.
- Fourth generation (4GL): Non-procedural languages in which the user states what is wanted, not how to do it. Examples: SQL (
SELECT name FROM student;), report generators, Oracle Forms. - Fifth generation (5GL): Languages based on constraints and logic, used in artificial intelligence. Examples: Prolog, Mercury.
Characteristics of 4GL
- Non-procedural; the programmer specifies the result, not the steps.
- Very close to natural language and easy to learn.
- Needs far fewer lines of code, so development is fast.
- Provides database access, report generation, forms and graphics.
- Often supports visual and drag-and-drop design.
- Can be used by end users with little programming skill.
- Slower and uses more resources than 3GL, and offers less control.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 8 marks
Which phase do you prefer more for program development? Give your own logics for clarification.
Answer
In my view the analysis (requirements analysis and design) phase is the most important phase of program development, and it is the one I prefer to give most attention to.
Reasons
- Everything else depends on it. If requirements are misunderstood, even perfect coding and testing produce the wrong system.
- Errors are cheapest to fix here. A mistake found in analysis costs a small fraction of the same mistake found in maintenance, because no code, tests or documents have to be redone.
- It reduces risk. Feasibility, clear specification and a good design (cohesive, loosely coupled modules) avoid delays and cost overruns.
- It gives the user a clear picture. Agreed requirements prevent disputes and later change requests.
- It makes later phases easier. Coding, testing and maintenance become simpler when the design is clear.
Coding and testing are important too, but they only implement and verify what analysis and design have decided. A well-analysed problem is already half solved.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 7 marks
What is programming tool? Explain algorithm and flow chart with suitable example.
Answer
Programming tool: A programming tool is any aid used by programmers to plan, write, test and maintain programs. Examples are algorithms, flowcharts, pseudocode, decision tables, editors, compilers, interpreters, debuggers and IDEs. Algorithms and flowcharts are planning tools used before coding.
Algorithm: A finite, step-by-step set of instructions that solves a problem. It must be clear, have input and output, and terminate.
Example: find the largest of two numbers.
- Start
- Read A and B
- If A > B, print A; otherwise print B
- Stop
Flowchart: A graphical representation of an algorithm using standard symbols joined by arrows: oval (start/stop), parallelogram (input/output), rectangle (process), diamond (decision), arrows (flow).
( Start )
|
/Read A, B/
|
< A > B ? >--No--> /Print B/ --\
|Yes |
/Print A/ ---------------------+
|
( Stop )
Flowcharts help to understand the logic, find errors early and document the program, while algorithms are easy to convert into code.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 8 marks
What is the importance of cohesion and coupling in program development? Distinguish between them.
Answer
Importance in program development
- Modules with high cohesion do one task, so they are easy to understand, test and reuse.
- Low coupling means a change in one module has little effect on others, so maintenance is easier and cheaper.
- Errors are easier to locate and isolate.
- Different programmers can work on separate modules in parallel.
- Together they give a modular, reliable and flexible design.
Distinction
| Basis | Cohesion | Coupling |
|---|---|---|
| Meaning | Strength of relationship among elements within a module | Degree of dependence between modules |
| Scope | Intra-module (inside a module) | Inter-module (between modules) |
| Desired level | High | Low |
| Types | Functional, sequential, communicational, procedural, temporal, logical, coincidental | Data, stamp, control, external, common, content |
| Effect when good | Module is reusable and understandable | Modules are independent and easy to change |
| Focus | What one module does | How modules are connected |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 7 marks
What is RAD? Write difference between Water fall model and RAD model.
Answer
RAD (Rapid Application Development) is a software development model that emphasises very fast development through prototyping, reusable components and heavy user involvement instead of long planning. The system is divided into modules developed in parallel in short time-boxed cycles (usually 60-90 days), and users review working prototypes repeatedly. Its phases are business modelling, data modelling, process modelling, application generation and testing and turnover.
Difference between Waterfall and RAD
| Basis | Waterfall model | RAD model |
|---|---|---|
| Approach | Linear and sequential | Iterative and incremental with prototypes |
| Development time | Long | Very short |
| User involvement | Mainly at start and end | Continuous throughout |
| Requirement changes | Hard and costly to accommodate | Easily accommodated |
| Reuse | Little | High reuse of components |
| Team | Phases handled one after another | Small teams develop modules in parallel |
| Risk | Problems found late | Problems found early |
| Suitable for | Small projects with fixed requirements | Modular systems needing quick delivery |
| Documentation | Heavy | Light |
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 7 marks
What is standalone programming? Write the advantages and disadvantages of client server programming.
Answer
Standalone programming is the development of programs that run completely on a single computer, without needing a network or another machine. All the user interface, logic and data are on the same device. Examples: MS Word, a calculator, a media player, an offline game.
Advantages of client-server programming
- Data is centralised on the server, so it is easier to secure, back up and keep consistent.
- Many clients can share resources and data at the same time.
- Updates are made once on the server and apply to all users.
- Clients and server can be upgraded or replaced independently.
- Heavy processing can be done on powerful servers, so weak client machines can be used.
- Easy to extend by adding more clients.
Disadvantages
- If the server fails, all clients are affected (single point of failure).
- Heavy traffic can overload the server and slow the network.
- Setting up and maintaining servers and networks is costly and needs skilled staff.
- Needs a network connection to work.
- Security attacks on the server affect the whole system.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 8 marks
What is web based programming? Write advantages of web based programming.
Answer
Web-based programming is the development of applications that run on a web server and are accessed by users through a web browser over the Internet or an intranet. The user interface is built with HTML, CSS and JavaScript, while server-side languages such as PHP, Python, Java, ASP.NET or Node.js process requests and work with databases. Examples: online banking, e-commerce sites, webmail, Google Docs.
Advantages
- Platform independent: works on any device with a browser, whatever its operating system.
- No installation: users do not need to install software.
- Easy updates: changes are made once on the server and everyone sees them immediately.
- Accessible anywhere: available at any time and place with Internet access.
- Centralised data: easier to back up and manage.
- Lower cost: no need to maintain many versions or install on each client machine.
- Scalable and easy collaboration: many users can share data and work together.
- Wide reach: a large number of users can be reached cheaply.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 7 marks
What is testing? Explain different types of testing with suitable example.
Answer
Testing is the process of executing a program with the intention of finding errors and checking that it meets its requirements. It improves the quality and reliability of software before delivery.
Types of testing
(a) Unit testing: Tests each individual module or function separately. Example: testing a function that calculates VAT with several inputs.
(b) Integration testing: Tests the combined modules to find errors in their interaction. Example: checking that the billing module correctly receives data from the stock module. It may be top-down, bottom-up or big-bang.
(c) System testing: Tests the complete integrated system against the specified requirements. Example: running a full sale process in a shop system from login to receipt.
(d) Acceptance testing: Done by the user or client to decide whether to accept the system. It includes alpha testing (at the developer's site) and beta testing (at the user's site).
(e) Black-box testing: Tests the functionality using inputs and outputs without looking at the internal code. Example: entering a wrong password and checking that login is refused.
(f) White-box testing: Tests the internal logic and paths of the code. Example: designing tests so that each branch of an if-else is executed.
(g) Regression testing: Re-testing after changes to ensure existing features still work.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 5 marks
Write short notes on: Iterative model
Answer
The iterative model develops software through repeated cycles. Instead of building the whole system at once, an initial simple version is built from a part of the requirements and then improved through successive iterations. Each iteration includes planning, analysis and design, coding, testing and evaluation, and produces a better working version.
Advantages
- A working version is available early.
- Changes in requirements are easy to handle.
- Risks and errors are found early.
- Gives continuous feedback from users.
Disadvantages
- Needs good planning and design to avoid architecture problems.
- Can exceed time and cost if iterations continue without control.
- Needs more management and resources than the waterfall model.
It is suitable for large systems where requirements may change and are not fully known at the start.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2024 Spring · 5 marks
Write short notes on: Types of documentation
Answer
Documentation is the written material that describes a software system. Its main types are:
- Requirements (SRS) documentation: Describes what the system must do, agreed with the client.
- Design documentation: Records the system design, such as DFDs, ER diagrams, flowcharts, module structure and database design.
- Program (technical) documentation: Explains the source code through comments, algorithms and file descriptions, for programmers and maintainers.
- Test documentation: Contains test plans, test cases and results.
- User documentation: Manuals, tutorials and help files that tell users how to install and operate the software.
- Operational/system documentation: Instructions for running, backing up and administering the system.
Together they make the system understandable, maintainable and easy to use.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
Questions from PU BCA 2025 Spring Computer Fundamentals and Application (Pokhara University BCA semester exam, Spring 2025), PU BCA 2024 Fall Computer Fundamentals and Application (Pokhara University BCA semester exam, Fall 2024), PU BCA 2024 Spring Computer Fundamentals and Application (Pokhara University BCA semester exam, Spring 2024), PU BCA 2023 Fall Computer Fundamentals and Application (Pokhara University BCA semester exam, Fall 2023), PU BCA 2021 Fall Computer Fundamentals and Application (Pokhara University BCA semester exam, Fall 2021), PU BCA 2025 Spring Digital Logic System (Pokhara University BCA semester exam, Spring 2025), PU BCA 2024 Fall Digital Logic System (Pokhara University BCA semester exam, Fall 2024), PU BCA 2024 Spring Digital Logic System (Pokhara University BCA semester exam, Spring 2024), PU BCA 2023 Fall Digital Logic System (Pokhara University BCA semester exam, Fall 2023), PU BCA 2021 Spring Digital Logic System (Pokhara University BCA semester exam, Spring 2021), PU BCA 2021 Fall Digital Logic System (Pokhara University BCA semester exam, Fall 2021), PU BCA 2025 Spring English for IT Professionals (New) (Pokhara University BCA, Spring 2025, new syllabus), PU BCA 2024 Fall English for IT Professionals (New) (Pokhara University BCA, Fall 2024, new syllabus), PU BCA 2024 Spring English for IT Professionals (Pokhara University BCA, Spring 2024), PU BCA 2023 Fall English for IT Professionals (Pokhara University BCA, Fall 2023), PU BCA 2021 Spring English (Pokhara University BCA, Spring 2021), PU BCA 2021 Fall English (Pokhara University BCA, Fall 2021), PU BCA 2025 Spring Mathematics I (Pokhara University BCA semester exam, Spring 2025), PU BCA 2024 Fall Mathematics I (Pokhara University BCA semester exam, Fall 2024), PU BCA 2024 Spring Mathematics I (Pokhara University BCA semester exam, Spring 2024), PU BCA 2023 Fall Mathematics I (Pokhara University BCA semester exam, Fall 2023), PU BCA 2023 Spring Mathematics I (Pokhara University BCA semester exam, Spring 2023), PU BCA 2021 Fall Mathematics I (Pokhara University BCA semester exam, Fall 2021), PU BCA 2021 Spring Mathematics I (Pokhara University BCA semester exam, Spring 2021), PU BCA 2025 Spring (New) Programming Logic and Technique (Pokhara University BCA semester exam, Spring 2025, new syllabus), PU BCA 2025 Spring (Old) Programming Logic and Technique (Pokhara University BCA semester exam, Spring 2025, old syllabus), PU BCA 2023 Fall Programming Logic and Technique (Pokhara University BCA semester exam, Fall 2023) and PU BCA 2024 Spring Programming Logic and Technique (Pokhara University BCA semester exam, Spring 2024). Answers are written for this site; check them against your class notes.