vuZs

Virtual University: Study Resource Bank

You are here: Home Assignment CS201: Introduction to Programming CS201 Assignment 4 (Dated: 26-6-2011)
Like this Page? Press  
 

Assignments and GDBs

CS201 Assignment 4 (Dated: 26-6-2011)

 

Click here to download the complete assignment

Note:Youhave to upload only .cpp file. Assignment in any other format (extension) will not be accepted. If you will submit code in .doc (Word document) you will get zero marks.

 

Objective

The objective of this assignment is to provide hands on experience of using

  • Streams in C/C++

Guidelines:

  • Code should be properly aligned and well commented.
  • Follow c/c++ rules while writing variables names, function names etc
  • Use only dev-C++ for this assignment.

 

Assignment

 

 

Problem Statement: 

           Printing Electricity Bill

Detailed Description:

Write a C++ program in which you have to:

  1. Create a text file “Electricity_Bill”.
  1. Write following data in it:

               Electricity Consumer Bill 

---------------------------------------------------------------------------

Reference No        Tariff        Load          Old A/C No

123456789123456     2              1              123456789123456

 

---------------------------------------------------------------------------

Name and Address   

XYZ Lahore Pakistan

 

---------------------------------------------------------------------------

Reading             MF     Total Unit Consumed    Total Cost of electricity

55671               1      328                      9999

 

---------------------------------------------------------------------------

Month             Units     Bill              Current Bill            10732

Jan-11            312       5000              Arrears                 0

Feb-11            312       5000              Tariff Subsidy          NA

Mar-11            312       5000              Payable within Duedate  10732 

 

---------------------------------------------------------------------------

 

  1. Open file and read data from it and display it on the screen.

        

Sample Output

 

if you can't see the above picture then download the complete assignment from attachment

Deadline

Your assignment must be uploaded/submitted on or before 29-06-2011.

 

Add comment


Security code
Refresh

You are here: Home Assignment CS201: Introduction to Programming CS201 Assignment 4 (Dated: 26-6-2011)