Académique Documents
Professionnel Documents
Culture Documents
Time: 2pm
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.
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.
Pension calculation:
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