You are on page 1of 10

Introduction to Software Engineering

Problem # 1

Task Description

Suppose we have the following database of students with course code and marks in each
course. In C/C++ we can either represent it in the form of structures (which is a
recommended technique) or multi-Arrays. But in this specific problem we would like to
represent this database in the form of 2-D array. Or some of you might consider it in the form
of a matrix (which is in fact a 2-D array). In arrays we cannot name the columns but instead
we use the indexes of the array to point to.

Stud_no Course_code marks


201 33 75
202 33 69
201 55 87
203 33 22
202 55 56
201 44 54
203 44 95
202 44 35
203 55 58

You are required to write a C program that can compute and print the following information
from the above database.

A. Total marks of each student with his/her average marks. E.g.


Total marks of 201 is X and his average is Y
B. Average marks scored in each course using course code column.
Average marks of course 33 is X
C. You need to store all data and result afterwards into the system.
D. There should be a feature to show the result in ascending and descending format with
respect to marks.
Problem # 2

Task Description

Suppose we have to design a calculator which has a memory function. The calculator can do
the basic calculations (Add, Subtract, Divide, Multiply) and gives the option to save the
current result. The purpose for the memory is that e.g. we perform 3 calculations and we
would like to save the result for the 1st calculation for use further. Therefore we can save that
to memory and perform other calculations. But when we want to use the saved answer we
can recall it from memory.
In a scenario:

Program Start >


Enter numA = 10
Enter numB = 5
Enter Calculation = Add
Sum is = 15

Do you want to save to memory? Previous saved answer will be overwritten! Y/N = Y
Do you want to continue? Y/N = Y
Do you want to use value from memory? Y/N = N

Enter numA = 20
Enter numB = 10
Enter Calculation = Divide
Sum is = 2

Do you want to save to memory? Previous saved answer will be overwritten! Y/N = N
Do you want to continue? Y/N = Y
Do you want to use value from memory? Y/N = Y

numA = 15
Enter numB = 2
Enter Calculation = Multiply
Sum is = 30
.
.
.

You are required to write a C program that implements these features.

A. The calculations can be performed accordingly by choices received from user.


B. There is an option to save the answer to memory. (Use ‘file system’.)
C. Retrieve the saved answer from memory and use it for calculation.
D. Do appropriate error handling and ensure proper flow of program.
Problem # 3

Task Description

An organization creates a management system for its employees. Features like inserting,
updating and displaying details about employees should be implemented. The program can
display certain information about selected employees or even display collective information
(such as total salary of all employees in a certain dept.) The program can also output the
displayed info as a print out (write to file).
In a scenario:

Program Start >


1-Insert Employee info
2-Update Employee info
3-Display options….
4-Quit

1
Enter name = Asad
Enter age = 26
Enter Dept. = CS
Enter salary = 25000
Saved!

1-Insert Employee info


2-Update Employee info
3-Display options….
4-Quit

3
Name of Employee whose info you want to display = Asad
Name = Asad
Age = 27
Dept. = CS
Salary = 27000
.
.

You are required to write a C program that implements these features.

A. Create a system that can add new employee information.


B. The system should properly find the appropriate person whose info has to be updated
and make the proper changes.
C. Implement relevant output/display options.
D. Write to file the display option (info being displayed) selected.
Problem # 4

Task Description

Almost all companies, especially large ones with many employees, branches or products
need some way to manage large amounts of data. For companies focused on managing their
finances systems need to be implemented to manage and manipulate a large number of
records. For now assume a system has to be implemented which manages employee pay and
tax records.

You are required to write a C program that implements these features.

A. Create a database with appropriate fields to record employee salary.


B. Implement a feature that can calculate the tax (based on salary paid e.g. 5% for salary
10000, 10% for salary 20000, etc. Make up reasonable rules.).
C. The tax will be deducted from the salary which has to be paid to the employee and
hence will update the table appropriately.
D. Output to file (as a report) the total salary paid to all employees and the total tax
which the company has collected/deducted.
Problem # 5

Task Description

Companies which have multiple products to sell usually require complex inventory
management systems to manage their affairs. Inventory systems mainly save data regarding
the details of products and their prices as well as quantity available in company warehouses.
Imagine a system has to be made to manage inventory which helps an organization manage
wares by adding or updating information about their products, record changes in stock and
provide a detailed report of the stocks to the managers.

You are required to write a C program that implements these features.

A. Create a database of the products which the company sells (Assume company sells 4
or 5 items and make up relevant details about them).
B. Create relevant fields which manage the warehouse stock for the items (Try to keep
this separate from the database in A).
C. Implement a system that records sales and production of the products by the company
(Include a system to manage expenses and profits).
D. The records for inventory fluctuation (profits, expenses, inventory status) should be
saved to a file and displayed as a means for record display.
Problem # 6

Task Description

Online marketplaces or online shopping web sites are similar in many ways to retail
companies which sell certain products. The benefit is that users can easily access the shop
from home look at details of products and place orders which will be delivered to their
entered address. Assume you have to make a P.O.S (Point of sale) system for an online
shopping website.

You are required to write a C program that implements these features.

A. Make a database of items with relevant information saved for better online access.
B. Implement a proper way to display item details to users (Images can be ignored for
now) or implement a “Browse Catalog” feature.
C. Manage an inventory and show items which are in stock or which are out of stock.
Also implement a feature which can be used to modify status of stock (restocking or
clearing stock e.g. for expired items).
D. Implement a shopping cart system that stores selected item details and can later
provide proper method to checkout and generate bill.
Problem # 7

Task Description

Restaurants or fast food chains nowadays implement a system to manage customer orders
and/or kitchen stocks. Food orders are taken from customers fed into a computer and the
order is relayed to the kitchen staff which can prepare the food and tell its status (wait time,
etc.) or if the ingredients for it are unavailable then they can timely inform the counter
person(s) that the order cannot be prepared. So assume you have to implement a system for a
fast food chain that serves certain dishes. There is a menu with details about the dishes
(ingredients), a kitchen stock (inventory of ingredients NOT full dishes), a system of
communication between cash counter and kitchen system, etc.

You are required to write a C program that implements these features.

A. A cash counter system that can display menu dishes and their prices as well as details
about their ingredients (in case customer wants to know what a certain dish contains).
B. A kitchen stock system that keeps track of the ingredients in the kitchen. If a certain
ingredient for a dish runs out it should display that dish (preferably on cashier side
that the dish cannot be prepared).
C. A home delivery system which combines features of A & B adding relevant features.
D. A report system that can generate reports (to file) of orders, finances and inventory
status (other relevant fields can also be added) [It should also predict popular dish].
Problem # 8

Task Description

Educational institutions usually have a system in place to grade students as well as generate
records to monitor trends or performances. Assume you have to design a system that can
analyze student performance in a certain course. For this, a database for a course with
different students enrolled in it is needed. Different students have attained different marks
close to 3 levels, good average and bad.

You are required to write a C program that implements these features.

A. Create a database of students which are enrolled in a specific course. This will
include student name, Id and marks attained.
B. Return all students that have achieved a good, average or bad grade (criteria depends
on you).
C. Return the course average.
D. Return how many different grades are in the course (e.g. 5 As, 10 Bs, 10 Cs, 5 Ds,
4Fs, etc.)
Problem # 9

Task Description

Some systems in educational institutions average student performance is measured by


analyzing the performance of students in different courses. Assume a system has to be
developed that has a data base of a number of different students and their performances
(number of grades attained). The system can isolate students with different performance and
also figure out courses where most students lacked or shined.

You are required to write a C program that implements these features.

A. Create a database of students and their attained grades in different courses (assume a
fixed number of courses)
B. Find number of students that performed good, average or bad.
C. Find out courses where most students got a good, average or bad grade.
D. Output details from B & C to a file in proper format to assist analysis of student
performance (also include courses where student performance was exceptionally
good or bad).
Problem # 10

Task Description

Promotions (sales and discounts) are a common way for most retail organizations to attract
customers. Memberships are a way for these companies to retain most customers by offering
special discounts or services exclusively or at reduced costs to their members. This concept
requires registration of customers either on choice or after achieving a certain goal.
Memberships also usually have levels that customers can attain by fulfilling certain
milestones (usually purchase bill or quantity).

You are required to write a C program that implements these features.

A. Create a table to determine requirements for different membership levels and related
benefits (This table will dictate what fields the customer data base will have).
B. Create a database which saves customer information and their current membership
level (data fields depends on you).
C. Monitor or modify details of customer when he/she makes a purchase or wants to
change his/her details (This should allow upgrading membership status also).
D. When customers make a purchase they are offered options to avail benefits or any
discounts are automatically applied to their bill based on their membership level.

You might also like