A

@Arpita3025

c++ program to swapping 2 different classes using virtual function

C++
2 years ago
#include <iostream> // Base class class Base { public: virtual void swap(Base* other) = 0; // Virtual function for swapping }; // Derived class 1 class ClassA : public Base {

c++ program of name,salary,age of 5 employee using exception handling

C++
2 years ago
#include <iostream> #include <string> #include <stdexcept> const int MAX_EMPLOYEES = 5; class Employee { protected: std::string name; double salary;

c++ program of name,salary,age of 5 employee using virtual function

C++
2 years ago
#include <iostream> #include <string> const int MAX_EMPLOYEES = 5; class Employee { protected: std::string name; double salary; int age;

c++ program to find the volume of cube ,cubiod and cylinder using exception handling

C++
2 years ago
#include <iostream> #include <cmath> #include <stdexcept> const double PI = 3.14159; class Shape { public: virtual double calculateVolume() const = 0; // Virtual function to calculate volume };

c++ program to find the volume of cube ,cubiod and cylinder using virtual function

C++
2 years ago
#include <iostream> #include <cmath> const double PI = 3.14159; class Shape { public: virtual double calculateVolume() const = 0; // Virtual function to calculate volume };

c++ program using class and object using virtual function

C++
2 years ago
#include <iostream> // Base class class Shape { public: virtual void displayArea() const = 0; // Virtual function to display area }; // Derived class for Circle class Circle : public Shape {

raise power using exception handling

C++
2 years ago
#include <iostream> #include <cmath> #include <stdexcept> double calculatePower(double base, int exponent) { if (exponent < 0) { throw std::invalid_argument("Exponent should be a non-negative integer."); } return pow(base, expo

raise power using virtual function

C++
2 years ago
#include <iostream> #include <cmath> class Power { public: virtual double calculatePower(double base, int exponent) = 0; }; class NumberPower : public Power { public:

avg of 5 no.s using exception handling

C++
2 years ago
#include <iostream> #include <stdexcept> double calculateAverage(int numbers[]) { double sum = 0.0; for (int i = 0; i < 5; ++i) { sum += numbers[i]; }

avg of 5 no.s using virtual function

C++
2 years ago
#include <iostream> class Average { public: virtual double calculateAverage() = 0; // Virtual function to calculate average virtual void inputNumbers() = 0; // Virtual function to input numbers }; class FiveNumbersAverage : public Average

hello world

C++
2 years ago
#include <iostream> #include <ctime> using namespace std; // Class with constructor and variable class HelloWorld { private: string message; public:

avg of 5 nos using inheritance

C++
2 years ago
#include <iostream> // Base class to input 5 numbers class Numbers { protected: double num[5]; public: void inputNumbers() { std::cout << "Enter 5 numbers: "; for (int i = 0; i < 5; ++i) {

swaping values using inheritance

C++
2 years ago
#include <iostream> // Base class class Number { protected: int value; public: Number(int _value) : value(_value) {} virtual void display() const { std::cout << "Value: " << value << std::endl; }

employee with name, salary ,age, using inheritance

C++
2 years ago
#include <iostream> #include <string> class Employee { protected: std::string name; int age; double salary; public:

volume of cube ,cubiod,cylinder using inheritance

C++
2 years ago
#include <iostream> // Base class class Shape { public: virtual double calculateVolume() const = 0;}; // Derived class for Cube class Cube : public Shape { private: double side;

object and class using inheritance

C++
2 years ago
#include <iostream> #include <string> class Animal { protected: std::string name; public: Animal(const std::string& _name) : name(_name) {}

Power using inheritance

C++
2 years ago
#include <iostream> // Base class class PowerCalculator { public: virtual double calculatePower(double base, int exponent) { return 1.0; // Default implementation for the base class } };// Derived class inheriting from Power

Create ddl commnd

MySQL
2 years ago
create table Emp(Eid Number, Ename varchar(20)); insert into Emp values (10, 'ankit'); insert into Emp values (20, 'ankush'); select * from Emp;

Bezier curve computer graphics

C
2 years ago
#include<graphics.h> #include<math.h> #include<conio.h> #include<stdio.h> void main() { int x[4],y[4],i; double put_x,put_y,t; int gr=DETECT,gm; initgraph(&gr,&gm,"C:\\TURBOC3\\BGI");

Polygon clipping exp 7

C
2 years ago
#include<stdio.h> #include<graphics.h> #include<conio.h> #include<stdlib.h> int main() { int gd,gm,n,*x,i,k=0; //window coordinates int wx1=220,wy1=140,wx2=420,wy2=140,wx3=420,wy3=340,wx4=220,wy4=340; int w[]={220,140,420,140,420,340,220,340,220