A

@Arpita3025

Assignment 3

C++
2 years ago
#include<iostream> #include<cstring> class Book { private: char* author; char* title; float price; char* publisher; int stockPosition;

Assignment 2

C++
2 years ago
#include <iostream> #include <cstring> class StringOperations { private: char* str; public: // Constructor StringOperations(const char* initialStr = "") {

Assignment 1.pp

C++
2 years ago
#include<iostream> class WeatherReport { private: int day_of_month; int high_temp; int low_temp; float amount_rain; float amount_snow;

Assignment 4

C++
2 years ago
#include <iostream> #include <cstring> class Person { private: char* name; char* dateOfBirth; char* bloodGroup; double height; double weight;

Assignment 3

C++
2 years ago
#include <iostream> #include <cstring> class Book { private: char author[50]; char title[100]; float price; char publisher[50]; int stockPosition;

Assignment 2

C++
2 years ago
#include <iostream> #include <cstring> class MyString { private: char* str; public: MyString() : str(nullptr) {}

Assignment 1

C++
2 years ago
#include <iostream> #include <iomanip> #include <vector> class WeatherReport { private: int day_of_month; int hightemp; int lowtemp; double amount_rain;

hello world using inheritance,friend function,constructor ,function overloading,exception handling

C++
2 years ago
#include <iostream> using namespace std; class Base { public: Base() { cout << "Base Constructor" << endl; } virtual ~Base() { cout << "Base Destructor" << endl;

printing hello world using inheritance,constructor,function overloading,exception handling ,frienfun

C++
2 years ago
#include <iostream> using namespace std; class Base { public: Base() { cout << "Base Constructor" << endl; } virtual ~Base() {

program volume c++

C++
2 years ago
#include<iostream> using namespace std; int volume(int l) { return (l*l*l); } double volume(double r, double h) { return (3.14*r*r*h); }

program employee c++

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

Python

Python
2 years ago
my_tuple = (1, 2, 3, 'apple', 'bananas') print("Original Tuple:", my_tuple) print("Element at index 2:", my_tuple[2]) print("Elements from index 1 to 4:", my_tuple[1:5]) a, b, *rest = my_tuple

Python

Python
2 years ago
my_set = {1, 2, 3, 4, 5} print("Original Set:", my_set) my_set.add(6) print("After Adding 6:", my_set)

Keylogger

C++
2 years ago
#include <iostream> #include <Windows.h> #include <map> #include <string> #include<vector> using namespace std; map<int, std::string> keyNames = { {VK_BACK, "Backspace"}, {VK_TAB, "Tab"}, {VK_CLEAR, "Clear"}, {VK_RETURN, "Enter"}, (VK_SHIFT, "Shift"

c++ program using classs and object exception handling

C++
2 years ago
#include <iostream> #include <stdexcept> class Calculator { public: static double divide(double num1, double num2) { if (num2 == 0) { throw std::invalid_argument("Division by zero error!"); } return num1 / nu

c++ program with file handling using exception handling

C++
2 years ago
#include <iostream> #include <fstream> #include <string> #include <stdexcept> void readFileAndWriteToFile() { std::ifstream inputFile("input.txt"); std::ofstream outputFile("output.txt"); if (!inputFile.is_open()) {

c++ program with file handling using virtual function

C++
2 years ago
#include <iostream> #include <fstream> #include <string> // Base class class FileHandler { public: virtual void writeFile(const std::string& filename) = 0; // Pure virtual function for writing to a file virtual void readFile(const std::stri

c++ program concept of exception handling using virtual function

C++
2 years ago
#include <iostream> #include <stdexcept> // Base class class Shape { public: virtual void draw() const = 0; // Virtual function for drawing virtual void handleException() const { throw std::runtime_error("Exception in base class Sha

c++ program to swapping 2 different classes using exception handling

C++
2 years ago
#include <iostream> #include <stdexcept> // Base class class Shape { public: virtual void draw() const = 0; // Virtual function for drawing virtual void handleException() const { throw std::runtime_error("Exception in base class Sha

c++ program to swapping 2 different classes using exception handling

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