Vous êtes sur la page 1sur 3

Department of Computing

CS111: Fundamental of Computer Programming


Class: BECE2016-B
Course Project
Marks = 100

Date: Last Lab of Course

Time: 2pm

Prepared by: Khurram Altaf


Instructor: Dr. Zeeshan

CS111: Fundamental of Computer Programming 1


PART A
You have to store the information related to goods in a store. A good can have following
attributes: itemid, name, price, count and category.

You can use dictionary or list concepts, where you feel necessary, but you have to write your
own functions to implement list/dictionary.

1. Write a function to display the menu, your menu should ask the user for input:
a. Enter 1 to list down all the items in the store
b. Enter 2 to add new item in the store
c. Enter 3 to update an existing item in store
d. Enter 4 to delete an item from store
e. Enter 5 to check out an item from the store
f. Enter 6 to check in an item at store
2. When option 1 is pressed, your program should call a function which should display all
the items available in the store, including their details as well.
3. When option 2 is pressed your program should call another function, which should add a
new item in your existing store.
4. When option 3 is pressed, your program should call a function, which should display all
the items available in the store, and ask you to provide itemid to edit the details of that
item and you should be able to update the particular item details for example change in
price.
5. Option 4 should call the function which should delete an item from the store.
6. Option 5 should call a function which should decrement a count for particular item,
which is being checkedout.
7. Option 5 should call a function which should increment a count for particular item, which
is being checkedin or stock is being added.
You have to write functions for processing of menu mentioned in point 1.

PART B
In this task you will create a program that an employee can use to calculate his/her pension. The
pension is calculated by applying some calculations on his/her last drawn salary.

Details about salary:

Employee's salary is divided into three parts. One part is the basic salary, the second part is the
house rent and the third part is the old age allowance. These three combine to form an
employees total salary.

CS111: Fundamental of Computer Programming 2


5% income tax and 7% provincial tax is deducted from the basic pay.
The house rent and old age allowance are calculated after the deduction of tax.
Employee, who is less than 45 years of age, gets no old age allowance.
For an employee who is between 45 and 55, old age allowance is 10%.
For employees older than 55 the old age allowance is 15%
Married employees are not given any house rent and the married get 15%.

Pension calculation:

An employee's pension is calculated according to the following rules:

Basic pay is doubled and multiplied with the number of months is service.
House rent is multiplied with the months in service since marriage.
Old age allowance is multiplied with 3.
Total pay is multiplied with 2.
The total of the above four are added together to compute the pension.

Take necessary input from a user and calculate her/his pension. You cannot ask the employee
about the months in service, or the months in service since marriage. Employee's input should be
a date and you need to calculate the months in your program. The output of the program must be
very structured and detailed. It not only shows the pension but also must show all the
calculations under proper heads and step-by-step so the employee can understand how the
pension is computed.

Submission Guidelines:
1. Always submit 1 day before the deadline to avoid any last minute delays.
2. You need to make two submissions, first as a compressed folder and second as an MS word
document containing solution code.
3. Evaluation will be done during last lab

Marks break down:


1. Working of the program: 70%
2. Code readability, coding style, comments: 10%
3. Output structure and aesthetics: 20%

CS111: Fundamental of Computer Programming 3

Vous aimerez peut-être aussi