Here is the *complete working Turbo C++ code* for questions *3 to 8*, written in old-style C++ (iostream.h, conio.h) and 100% compatible with *Turbo C++ 3.0*. --- ### ✅ *Q3. Volume Using Function Overloading* cpp #include #include class VOLUME { public: float findVolume(float side) { return side * side * side; // Cube } float findVolume(float l, float b, float h) { return l * b * h; // Box } float findVolume(double radius) { return (4.0 / 3) * 3.14 * radius * radius * radius; // Sphere } float findVolume(double radius, float height) { return 3.14 * radius * radius * height; // Cylinder } }; void main() { clrscr(); VOLUME v; cout << "Volume of Cube (side 5): " << v.findVolume(5.0f); cout << "\nVolume of Box (2x3x4): " << v.findVolume(2.0f, 3.0f, 4.0f); cout << "\nVolume of Sphere (radius 3): " << v.findVolume(3.0); cout << "\nVolume of Cylinder (radius 2, height 5): " << v.findVolume(2.0, 5.0f); getch(); } --- ### ✅ *Q4. Area Using Constructor Overloading* cpp #include #include class AREA { public: AREA(int side) { cout << "Area of Square: " << side * side << "\n"; } AREA(int l, int b) { cout << "Area of Rectangle: " << l * b << "\n"; } AREA(float radius) { cout << "Area of Circle: " << 3.14 * radius * radius << "\n"; } AREA(float base, float height, int dummy) { cout << "Area of Triangle: " << 0.5 * base * height << "\n"; } }; void main() { clrscr(); AREA a1(4); // Square AREA a2(5, 6); // Rectangle AREA a3(3.5f); // Circle AREA a4(4.0f, 5.0f, 0); // Triangle getch(); } --- ### ✅ *Q5. Friend Function to Swap Price* cpp #include #include class PRODUCT { private: int pid; float price; public: void input() { cout << "Enter PID and Price: "; cin >> pid >> price; } void display() { cout << "PID: " << pid << ", Price: " << price << "\n"; } void doExchange(PRODUCT &p) { float temp = price; price = p.price; p.price = temp; } friend void doSwap(PRODUCT &a, PRODUCT &b); }; void doSwap(PRODUCT &a, PRODUCT &b) { float temp = a.price; a.price = b.price; b.price = temp; } void main() { clrscr(); PRODUCT P1, P2; P1.input(); P2.input(); cout << "\nBefore Exchange (Member Function):\n"; P1.display(); P2.display(); P1.doExchange(P2); cout << "\nAfter Exchange (Member Function):\n"; P1.display(); P2.display(); doSwap(P1, P2); cout << "\nAfter Swap (Friend Function):\n"; P1.display(); P2.display(); getch(); } --- ### ✅ *Q6. Friend Function Between Two Classes* cpp #include #include class SY; // Forward declaration class FY { private: int marks; public: void input() { cout << "Enter FY Marks: "; cin >> marks; } void display() { cout << "FY Marks: " << marks << "\n"; } friend void exchange(FY &f, SY &s); }; class SY { private: int marks; public: void input() { cout << "Enter SY Marks: "; cin >> marks; } void display() { cout << "SY Marks: " << marks << "\n"; } friend void exchange(FY &f, SY &s); }; void exchange(FY &f, SY &s) { int temp = f.marks; f.marks = s.marks; s.marks = temp; } void main() { clrscr(); FY fy; SY sy; fy.input(); sy.input(); cout << "\nBefore Exchange:\n"; fy.display(); sy.display(); exchange(fy, sy); cout << "\nAfter Exchange:\n"; fy.display(); sy.display(); getch(); } --- ### ✅ *Q7. Menu-Driven BILL Program* cpp #include #include class BILL { int pid[5]; int price[5]; int count; public: void initCount() { count = 0; } void takeProducts() { if (count < 5) { cout << "Enter PID: "; cin >> pid[count]; cout << "Enter Price: "; cin >> price[count]; count++; } else { cout << "Product limit reached!\n"; } } void displayProducts() { for (int i = 0; i < count; i++) { cout << "PID: " << pid[i] << ", Price: " << price[i] << "\n"; } } void displayTotalPrice() { int total = 0; for (int i = 0; i < count; i++) { total += price[i]; } cout << "Total Bill: " << total << "\n"; } }; void main() { clrscr(); BILL b; int choice; b.initCount(); do { cout << "\n1. Add Product"; cout << "\n2. Display Products"; cout << "\n3. Display Total Price"; cout << "\n4. Exit\n"; cout << "Enter your choice: "; cin >> choice; switch (choice) { case 1: b.takeProducts(); break; case 2: b.displayProducts(); break; case 3: b.displayTotalPrice(); break; case 4: break; default: cout << "Invalid choice!\n"; } } while (choice != 4); getch(); } --- ### ✅ *Q8. Array of STUDENT Objects* cpp #include #include class STUDENT { private: int rollno; char name[20]; float percentage; public: void input() { cout << "Enter Roll No: "; cin >> rollno; cout << "Enter Name: "; cin >> name; cout << "Enter Percentage: "; cin >> percentage; } void display() { cout << "Roll No: " << rollno << ", Name: " << name << ", Percentage: " << percentage << "\n"; } }; void main() { clrscr(); STUDENT s[5]; int i; for (i = 0; i < 5; i++) { cout << "\nEnter details of student " << (i + 1) << ":\n"; s[i].input(); } cout << "\n--- Student Details ---\n"; for (i = 0; i < 5; i++) { s[i].display(); } getch(); } --- Let me know if you want all these in a single file or with input validations!