0% found this document useful (0 votes)
0 views2 pages

Mid Term

Uploaded by

iqra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views2 pages

Mid Term

Uploaded by

iqra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

University of Sargodha Main Campus

Department of Software Engeering

Course Code: SECC301 Software Construction And Development Time: 90 minutes


Class:BSSE 5TH (Mid-Term) Date: 27/10/2024

Total Marks: 30
Answer the following short questions. (5x2=10)

Q1) How COTS components impact the software construction process?

Q2) Write a program to multiply 15 by 3 using bit manipulation instead of the multiplication operator .

Q3) Differentiate between the Adapter and Facade design patterns, how each pattern interacts with interfaces.

Q4) Why should system-level design avoid circular class dependencies, and which principle/ rule is applied to
eliminate them?

Q5) Give for each three examples for routine , class and package interface level abstraction.

Answer the following long questions. (2x10)

Q6) Fill the table with at least 10 distinct tests cases for the vulnerable program given below; for each case
indicate result/output (Crash / Wrong output / SQL injection / Other), cause (1–3 words), and one-line
solution/fix. Table format given below

import sqlite3

total_input = input()

quantity_input = input()

username_input = input()

total = int(total_input)

quantity = int(quantity_input)

print(total / quantity)

print(total + username_input)

conn = sqlite3.connect(":memory:")

cur = conn.cursor()

cur.execute("CREATE TABLE users(id, username)")

cur.execute("INSERT INTO users VALUES (1, 'alice')")

query = "SELECT * FROM users WHERE username = '" + username_input + "';"

print(query)

No # Test Input (total, qty, username) Result /output Cause Suggested


Fix
Q(7) A software company is developing a popular E-Commerce Platform that manages products,
customers, orders, payments, and secure user login. The first prototype has become difficult to
maintain—small changes in one module break other parts of the system, internal data is accessed
directly, and many components are tightly coupled. Since the platform must later support mobile apps,
multiple payment gateways, AI-based recommendations, and third-party integrations, the system
design now requires major improvement. Explain in detail which heuristic design approaches can
help redesign this e-commerce platform to improve its flexibility, scalability, and long-term
maintainability.

You might also like