Document Information
1,565 Reads | 0 Comments
Description
Write a c++ program that sorts an array of number sort function to be overloaded to support both integer array and float array.
An electricity board charge following rate for domestic user to discharge large cunsesion of
For first 100 units 60 per unit
For next 200 units 80 per unit
Beyond 300 units 90 per unit
All users are charge minimum of rupees 50 all the total amount if more than rupees 300 than additional charge 15% it added write a program to read the name of users and number of unit consume and print out the charge with name.
Write a function power to raise a number of M to N power to function take a double value for M integer value for N and return the result correctly use a default value of 2 for N to make function to calculate squre when this argument is omitted write a name function that gets values of M and N from the users to test the function
make display_area as a virtual function & redefine this function in derived class to suit the requirements.Using these three classess design a program that will accept dimention of a triangle or a retangle interactively & display the area.
Remember the two value given as input will be treated as lengths of two side of the case of rectangles & as base & height in the case of triangles & used as follows:=>
Area of rectangle = x*y
Area of triangle =1/2* x*y
Assume that a bank maintains two kinds of accounts for customers, one called as savings account and the other as current account.The savings account provides compound interest and withdrawal facilities
but no cheque book facility. The current account provides cheque book facility but no interest. Current account holders should also maintain a minimum balance of Rs. 500 and if the balance falls below this level , a 11% service charged is imposed. Create a class account that stores a customer name, account number and type
of account. From this derive the classes current_acc and savings_acc to make them more specific to their requirements. Include necessary member functions in order to achieve the following tasks.
a) Accept deposit from the customer and update the balance.
b) Display the balance.
c) Compute and deposit the interest.
d) Permit withdrawal and update the balance.
e) Check for the minimum balance, impose penalty, necessary, and update the balance.
Do not use constructors. Use member functions to initialize the class members.
Write a program to input string from user & print the following types of triangle depend on input.
e.x if user input “program” then
P r
P r o
P r o g
P r o g r
P r o g r a
P r o g r a m
17 Pages