ICT1402 Tutorial 11
ICT1402 Tutorial 11
Department of Computing
1. Type in and run all programs presented in lecture note 11. Briefly describe the theory/
concept you learned from these programs separately.
4. Following list represents the data units used by three persons. Create an array to store
these details and print the list.
person work mobile home
1 500 1000 300
2 10 1800 200
3 200 400 700
5. Write a program to store students’ marks for COM1407 subject. Assume there are 10
students in the class. You have to store marks in a 2D array as shown below.
1
Find the following using the above entered marks;
I. Display detailed mark sheet
II. Find the highest marks for midterm examination, portfolio work and end semester
examination separately
III. Find the student count based on the following criteria
a. Rounded Marks >= 90% : Grade A
b. Rounded Marks >= 80% : Grade B
c. Rounded Marks >= 70% : Grade C
d. Rounded Marks >= 60% : Grade D
e. Rounded Marks >= 40% : Grade E
f. Rounded Marks < 40% : Grade F
Your output should be displayed as follows
Grade Count
A
B
C
D
E
6. Assume a village has 20 houses. Input electricity unit charges and calculate total
electricity bill according to the following criteria:
For first 50 units Rs. 0.50/unit
For next 100 units Rs. 0.75/unit
For next 100 units Rs. 1.20/unit
For unit above 250 Rs. 1.50/unit
An additional surcharge of 20% is added to the bill
I. Write a program to store house address, units consumed, surcharge and total
amount separately in arrays.
II. Display the detailed monthly consumption report of the village using the
following order
2
7. Extend the following program that you did in Tutorial 05 to store the processed bills in a
buffer.
Develop a program to a cashier system for a shop.
Your system should display following prompt for the cashier and the entire program is
controlled according to the command given by the cashier.
Press S Start
Press Q Quit
Your option : _
Once you press S: System will display welcome message and ready for processing a bill
by initializing required variables.
Once you press Q: You can shut down the cashier system.
Once you press P: Process the current customer’s shopping cart. Here, you can enter the
item code, qty, unit price of the items in shopping cart and calculate and display the total
Once you finished serving to the current customer, you can press N to move to the
prompt.