WAP to create a class Greater. Which have one private data member x. And member function input(),Max(). Find the greater no between two objects without using operator overloading.
Wap to create two Base class String1,String2 and private data members called str1,str2 respectively, And one derived class StringConcat derived from that two base class which concatenate that two base class's data members and display it. You use whatever member function which suit your program
Q1. Write the statements using seekg() to achieve the following:
(i) To move the pointer by 15 positions backward from current position.
(ii) To go to the beginning after an operation is over.
(iii) To go backward by 20 bytes from the end.
(iv) To go to byte number 50 in the file.
Q2. Write a Program in C++ that will read a line of text containing more than three words and then replace all the blank spaces with an underscore(_).
Add two distances in inch-feet by creating a class named 'AddDistance'
Write a program that would print the information (name, year of joining, salary, address) of three employees by creating a class named 'Employee'. The output should be as follows: Name Year of joining Address Robert 1994 64C- WallsStreat Sam 2000 68D- WallsStreat John 1999 26B- WallsStreat
Write a program to print the volume of a box by creating a class named 'Volume' with an initialization list to initialize its length, breadth and height. (just to make you familiar with initialization lists)
Print the sum, difference and product of two complex numbers by creating a class named 'Complex' with separate functions for each operation whose real and imaginary parts are entered by the user
Print the average of three numbers entered by the user by creating a class named 'Average' having a function to calculate and print the average without creating any object of the Average class.
Write a program to print the area of a rectangle by creating a class named 'Area' taking the values of its length and breadth as parameters of its constructor and having a function named 'returnArea' which returns the area of the rectangle. Length and breadth of the rectangle are entered through keyboard.
Write a program to print the area of two rectangles having sides (4,5) and (5,8) respectively by creating a class named 'Rectangle' with a function named 'Area' which returns the area. Length and breadth are passed as parameters to its constructor