Tuesday, 14 October 2014

CODE-CS3L04

1. Create a class called Shape with protected data members as width,  height and appropriate member functions. Derive another class called Rectangle having only member as getarea(). Test the program which finds area of rectangle.

2. create a class called shape having protected data members width and height.
Create another class called paint having only member called paint_cost() which finds total cost of painting with rate of Rs 80 per unit area.
Derive a class called rectangle from these two classes having only one member called get_area(). Test the program to find cost of painting of the rectangle.

3. create a base class called student with members name , rollnumber and appropriate member functions .Derive a class called test having protected members subject1 subject2 ,subject3 each out of 100. Derive another class called result from test which  displays first division second division or third division. Test the program using main function.

Tuesday, 16 September 2014

Assignment code-CS3L03

1. Overload unary ++ operator to increment the data member value by 1
2. Overload unary postfix  ++ operator to increament data member value by 1.
3. Overload binary == to compare two complex numbers and returns a boolean
value.
4. Overload all the four binary arithmetic operators.

Wednesday, 20 August 2014

Assignment code-CS3L02

1. use the concept of function overloading to find out volume of a cuboid, volume of a cylinder and volume of a rectangular box.

2. define a class called item having data members rate and quantity.
use appropriate member functions to initialise the values and to display the total cost.

3. define a class called bank having data members account, name, balance. use appropriate member functions to initialise the values, deposit certain amount, withdraw certain amount and display name and balance
4.
Define a class BOOK with the following specifications :
Private members of the class BOOK are
BOOK NO                integer type
BOOKTITLE             20 characters
PRICE                     float (price per copy)
TOTAL_COST()        A function to calculate the total cost for N number of copies where N is passed to the                               function as argument.
Public members of the class BOOK are
INPUT()                   function to read BOOK_NO. BOOKTITLE, PRICE
PURCHASE()            function to ask the user to input the number of copies to be purchased. It invokes                               TOTAL_COST() and prints the total cost to be paid by the user. 
Test using main function.

5. Create a class called Triangle with private members s1, s2, s3. Use appropriate member functions to calculate the area of the triangle if possible.

Assignment code-CS3L01

1.Find out the compound interest for p=10000, r=8.75, t= 1,2,3 ...10 for two decimal points only.

2. find the sine value using the sine series.

3. Find out the pi value using the series. also find out the number of terms for which pi= 3.14159.

4.check number prime less than 1 lac.

C Programming

  Table of Contents ​ About the Author 3 ​ Introduction 4 ​ Introduction to Computers 4 1. What is a Computer? 4 2. History...