. Write a program having a Class Mile with data member dis_mile. Another Class Kilometer with data member dis_kilo. Both classes stores distances. In main function create objects these two classes with parameterized constructors. Write down conversion function for converting Kilometer object to Mile class object
Write a program having Classes Rectangle with data members’ length and width, Square with data member side, EquilatralTraingle with data member side. All these classes are derived from class Shape. Write an independent function which will exhibit polymorphism and show the area of the object passed to the function. All data members of class are private; you can write suitable functions needed for you
write pseudocode for the mainlin logic that contains the elements requaired
C++ PROGRAMMING
The "TRC Institute" records and monitors performance of three (3) machines over a period of four (4) days (l to 4) as shown in the Table 1, 2 and 3 respectively. The production ranges between 15.5 and 75.5
Table 1- Machine "A" Production
Day 1 2 3 4
Array index 0 1 2 3
Production 15.5 25.5 27.5 60.5
Table 2- Machine "B" Production
Day 1 2 3 4
Array index 0 1 2 3
Production 50 45.5 25.5 18
Table 3- Machine "C" Production
Day 1 2 3 4
Array index 1 2 3 4
Production 35.5 65 71 74.5
Write a function using C++ statements called PrintChart() which takes three float arrays (valuel, value2, value3) and an integer (as day) as parameters. The function calls GetProduction and PrintBar functions to print the output as given below.
Sample Output.
Day 1
Machine A **
Machine B *****
Machine C ****
Write a C++ program for implementing the following
a. Create a class called Employee with Employee name, Designation and Basic Pay as data members.
b. Inherit a class called Allowance from Employee with HRA and DA as data members
c. Inherit a class called Deductions from Employee with PF and Income Tax as data members
d. Inherit class Salary from Allowance and Deductions which has Net pay as its data member.
Create an array of employees, calculate net pay for each employee and sort them (using operator overloading).
write a complete C++ program that: a) initially asks the user to enter five sets of first name, last name and age; b) extracts the first name initial from the entered first name; c) uses arrays to store the entered information; and d) displays on the output monitor all the five sets of entered information in a table form as shown in sample output below.