class and object
1) Write a program to create simple calculator for addition, subtraction, division, multiplication,
modulus, factorial, gcd, lcm, power, square root, cube root using class and object?
2) Write a program to give information about any number such as whether it is even odd, prime or
not prime, or positive or negative, palindrome or not using class and object?
3) Write a program to find area and perimeter of rectangle using class and object?
4) Write a program to find area and perimeter of square using class and object?
5) Write a program to find area and perimeter of triangle having 3 sides using class and object?
6) Write a program to display type of triangle using sides of triangle?
7) Write a program to create banking application to perform following using using class and
object?
a) Initialize with initial balance Rs 3000
b) Deposit amount if balance is more than 1000 otherwise take Rs 100 as penalty for
deposit
c) Withdraw amount if balance is more than 1000 otherwise alert user for low balance
d) check for balance
8) Write a program to search for a user defined number in array of 20 numbers using linear search
and binary search using class and object? Allow user to choose searching method.
9) Write a program to implement stack and perform following using class and object?
a) create an stack of size 10 using array
b) insert 10 elements into stack using push and isfull method
c) find factorial of difference between largest and smallest
element of stack
d) search any user defined element in stack using peak method
e) delete 3 elements from stack using pop and isempty method
f) display remaining element of stack
10) Write a program to implement queue and perform following using class and object?
a) create an queue of size 10 using array
b) insert 10 elements into queue using insert method
c) replace even numbers available in queue with nearest prime numbers
d) display number of odd and prime numbers.
e) delete 3 elements from queue using delete method
f) display remaining element of queue.
Polymorphisim
1) Write a program to find area and perimeter of circle,square,rectangle and triangle using function
overloading?
2) Write program to display following pattern using function overloading?
Odd number based pyramid starts from value n received from user
n+1
n+3 n+6
n+5 n+10 n+15
n+7 n+14 n+21 n+28
even number based pyramid starts from value n received from user
n+2
n+4 n+6
n+6 n+10 n+14
n+8 n+14 n+20 n+26
user defined character suppose entered character is k
k
k k
k k k
k k k k
3) Write a program to sort 10 numbers in the array using following sorting algorithm and function
overloading?
a) merge sort
b) quick sort
c) heap sort
4) Write a program to calculate interest that may be simple or compound using function overloading?
5) Write a program to overload sum method if arguments are numbers than it will add numbers or
string than concat two strings using function overloading?
6) Write a program to check whether a number or string is palindrome or not using function
overloading?
7) Write a program to find volume of rectangle and square box using function overloading?
8) Write a program to add two complex numbers using operator overloading?
9) Write a program to find area and perimeter of 3 boxes in which dimension of box is known to user
and the 2nd box is 3/4th of 1st box and third box is the addition of 1st and 2nd box using operator
overloading?
Inheritance
1. WAP to find area and volume of a TV using simple inheritance?
2. WAP to find area, volume and weight of a box using multilevel inheritance?
3. WAP to find simple and compound interest using simple inheritance?
4. WAP to create an application for Student Assessment using inheritance?
a) There are 5 Students in the class.
b) Each student has attributes like Name , Roll No for unique ID and 5 subjects like C, C++, Java,
Python, IoT. Full mark of each subject is 100 that is combination of 40 Marks for internal and 60 for
external. CreditPoint of each subject is 3.
c) For each subject, accept number of classes attendered by students and total number of class taken
by teacher and find the ratio between these two estimate the internal mark of the subject.
d) external mark will be received from the teacher.
e) Find grade of each subject.
f) Find SGPA of student.
g) Display the result as per the IGIT result format
5. WAP to create an banking application using inheritance and do following.
a) Create current account of the user with user Id and minimum balance 500.
b) Allow user to deposit, withdraw and check balance on the account.
c) Allow user to open fixed deposit account with the user defined amount available on the current
account and display the interest obtained quarterly and the final maturity value with the interest
obtained.
d) Allow user to open Rd deposit account with the user defined amount available on the current
account and display the interest obtained quarterly and the final maturity value with the interest
obtained. Allow user to deposit premium monthly manually or automatically from the account.
e) Allow user to take loan against the 90% of money available on the current account. Check for the
monthly premium paid after few duration with the interest obtained.
5. WAP to find area, perimeter and volume of a Rectangular, square and Circular Box using multilevel
inheritance and function overriding?
6. WAP to find simple interest provided by bank on the available amount on the saving account by
various banks SBI, Union, HDFC, ICICI with rate of interest 6.5,6.5, 7.4, 7.9 respectively using
function overriding and virtual class. Minimum rate of interest is 5.4 and mechanism to compute
simple and compound interest is set by RBI.
7. WAP to display who is the owner of bike in which parent and child has a bike of same brand using
using function overriding and virtual class?
8. WAP to find repeated elements and no of repeated elements in the array of 20 user defined values
and also remove redundant values and update array with unique values only using simple inheritence?
Friend class and friend function
1. WAP to create a simple calculator for operations such as +, -, *, /,%, factorial of largest among two
numbers using friend class?
2. WAP to find area and perimeter of rectangle and square using function overloading and friend class?
3. WAP to difference between sum of all even and odd numbers in an array of 10 numbers using friend
function?
4. Write a program to swap two numbers without using 3rd variable and with using 3rd variable using
friend function?
5. Write a program to volume of a box which is a mixture of two boxes of user defined dimensions
using friend class or friend function?