Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CS 680: ASSIGNMENT

1) TUJENGE General Supplies Company is dealing with supplying of different types of cements
(Twiga, Simba, Dangote etc.). The Company acquires cements from wholesale
distributors/companies and supplies to its customers (individuals/companies). In each year,
the company needs to know the quantity, tax and profit for each cement type supplied to its
prospective customers. It requires a computer program that keeps record and gives report
on the purchasing and selling costs of individual 50kg cement bags and their corresponding
quantities supplied per year e.g. 2019. In addition, the program should report the tax paid
and the net profit made for individual cement types supplied to its customers in that year.

2) Tax payments is done based on the following conditions:

(i) If the quantity supplied is below 1,500 cement bags, the tax is 15% of sales.

(ii) If the quantity supplied did not exceed 3,000 cement bags, the tax is 20% of sales
otherwise the tax is 25%.

You are required to:

(a) Conduct problem analysis and design. 5 marks


(b) Write algorithms of:
(i) The function to calculate tax. 6 marks
(ii) The function to calculate profit.
(c) Explain how you are going to format and display your final output as shown in 4 marks
the sample report for a year 2019?
(d) Write the main program which calls two functions in part (b). 10 marks
3) Display your output in the following format below and use the given sample data for testing
as shown in the report for a year 2019.
REPORT FOR YEAR 2019

SN CEMENT TYPE PURCHASING SELLING QUANTITY TAX PROFIT


PRICE/BAG PRICE/BAG SOLD
1 Twiga 8,000 12,000 1,500 XXXXX YYYYY
2 Dangote 7,000 10,000 2,500 AAAA BBBB
4) Submit your work via LMS in word document format. Write your Registration number, Full
name and Programme name e.g. MEM-Evening. Capture and paste on your word document
a screenshot of your running program that uses sample input data given in part (3) and
displays a formatted report for a year 2019 as shown in part (3).

NOTE: Submission deadline date: 02/02/2020

You might also like