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

CSE1004 Lab L19 L20

Lab IV – Socket Programming


Problem to resolve:
Electricity distribution office has the following fare chart. Total consumed units and amount to
be paid by the consumer, need to be displayed on the client side scree.

Consumed Units Price per Unit Discount


0-100 0 0
101-250 1.25 1.25%
251-500 2.50 2.50%
500 and above 5.00 3.75%

Client Side :
Read previous month reading & present reading.
Server Side :
Calculate consumed units.[Consumed Units = Present reading – Last month reading]. Calculated
to amount to be paid by the consumer and send it as a response.

You might also like