Create two classes DistMeter and DistFeet, which stores the values of distances.

b) Create two classes DistMeter and DistFeet, which stores the values of distances. DistMeter stores in meter and cm and DistFeet in feet and inches. Write a program that read values for objects of both the classes and add object of DistMeter and DistFeet using friend function. A function should return equivalent meter in float. Also write main() function for illustration of the usage of the two classes DistMeter and DistFeet.

Two classes Degree and Radian are given.

a) Two classes Degree and Radian are given. Both classes have deg and rad data members in
float respectively. Define classes such that they support the statement:
Rad_obj = Deg_obj;
Write a complete program which convert object of Degree to object of Radian. Define
conversion function in source class. (1 radian = degree ×  / 180)

A class Student has rollno, branch; Inter_exam has sub1mark, sub2mark; Ext_exam has sub1mark, sub2mark and Result has Total as data members.

a) A class Student has rollno, branch; Inter_exam has sub1mark, sub2mark; Ext_exam has
sub1mark, sub2mark and Result has Total as data members. Write necessary member
functions to input and print data. Calculate internal exam and external exam subtotals using their respective member functions. Result has a function to calculate Total=internal + external subtotals. Write a complete program to implement the hierarchy of the classes using virtual base class.

What are the characteristics of a constructor?

b) What are the characteristics of a constructor? A class Time has data members: hour and
minute in integer. Only define a class having data members int a and float b, with default,
parameterized and copy constructor.

Write a complete C++ program with the following information.

a) Write a complete C++ program with the following information.
Define a class having data member string of 20 characters. Define default constructor,
getdata() and print() functions. Define the following member functions without using string.h file:
i) A member function receives an object of the class as an argument and compares it
with the invoking object. If the strings are not equal it returns 0 else 1.
ii) A member function returns the string length of invoking object.
iii) A member function checks whether the data member of invoking object is palindrome
or not. If the string is palindrome, it returns 1 else 0. (Palindrome means reverse of the
string is same as the original one.)