#include <iostream>
#include <bits/stdc++.h>
#define ld long double
#define ull unsigned long long
#define ll long long
#define BMW_3nn_3nn_3nn \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define sz(s) (int)s.size()
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define endl "\n"
using namespace std;
/*class point{
public:
int hr, min, sec ;
};*/
/*class point2 {
private:
int x, y;
public:
void set_x(int n) {
if (n>24 or n<0) cout<<"Error"<<endl;
else x=n;
}
void set_y(int m) {
if (m>=60 or m<0) cout<<"Error"<<endl;
else y=m;
}
int get_x() {
return x;
}
int get_y() {
return y;
}
};*/
/*class student {
private:
char name[100];
int id;
public:
student() {
cout << "object created"<< endl;
}
void set_name_id(char n[] , int p) {
strcpy(name, n);
id = p;
}
~student() {
cout << "object deleted"<< endl;
}
void display() {
cout << name << "\t"<< id << endl;
}
};
/*void f(student s) {
student s1;
s1=s;
s.set_name_id("sami",30);
s.display();
s1.display();
}*/
/*class Dog {
private:
string name;
int wight ;
public:
Dog() {
cout << "object created by empty constructor" << endl;
}
Dog(const Dog& d) {
name = d.name ;
wight = d.wight;
}
Dog(string n, int w): name(n), wight(w) {
cout << "object created by paramatreize constuctor " << endl;
}
void display() const
{
cout << "hello dog" << endl;
}
void set_name_wight(string n , int w) {
name=n;
wight = w;
}
int get_wight() const
{
return wight;
}
string get_name() const
{
return name ;
}
~Dog() {
cout << "object deleted" << endl;
}
};*/
/*class Distence {
private:
int feet ;
float inshes ;
public:
Distence(): feet (0), inshes (0) {
}
Distence (int f ,float i ) : feet (f), inshes (i) {}
Distence operator + (Distence d) {
int f = feet + d.feet;
float i = inshes + d.inshes;
if (i>=12) {
i = i + 12;
f++;
}
return Distence(f,i);
}
Distence operator - (Distence d) {
int f;float i ;
if (feet >= d.feet) {
f = feet - d.feet;
}
if (inshes >= d.inshes) {
i = inshes - d.inshes;
}
if (i>=12) {
f += int (i / 12);
i = i - (i/12);
}
return Distence(f,i);
}
void display() {
cout << feet << "\t" << inshes << endl;
}
};*/
/*class bankaccount {
private:
int accountnumber;
double balance;
public:
bankaccount():accountnumber(0),balance(0) {
}
bankaccount(int d , double a): accountnumber(d ), balance(a) {
}
void set_accountnumber(int d) {
accountnumber = d;
}
void set_balance(double a) {
balance = a;
}
int get_accountnumber() {
return accountnumber;
}
double get_balance() {
return balance;
}
void deposit(double a) {
if (a > 0) {
balance += a;
} else {
cout << "Invalid deposit amount !" << endl;
}
}
void withdraw(double a) {
if (a > 0&& balance >= a) {
balance -= a;
}else {
cout << "Insufficient funds or Invalid amount !" << endl;
}
}
bankaccount (const bankaccount &a) {
accountnumber = a.accountnumber;
balance = a.balance;
}
bankaccount operator+(const bankaccount& b) {
bankaccount temp;
temp.set_balance(balance + b.balance);
return temp;
}
bankaccount operator-(const bankaccount& b) {
bankaccount temp;
temp.set_balance(abs(balance - b.balance));
return temp;
}
void display() {
cout <<"id account "<< accountnumber << " amount acount " << balance << endl;
}
};*/
class animal {
private:
string name;
int age ;
public:
animal(string n , int a): name(n), age(a) {}
void sound() {
cout << "the animal's name makes sound ";
}
void displayinfo() {
cout << "name is " << name <<" age is "<< age << endl;
}
};
class dog : public animal {
private:
string breed;
public:
dog (string n , int a,string b): animal(n,a), breed(b) {}
void sound() {
cout << "the dog's breed is milk "<< endl;
}
void displayinfo() {
animal::displayinfo();
cout << " breed is " << breed << endl;
}
};
int main() {
BMW_3nn_3nn_3nn ;
/*
point t;
cin>> t.hr;
point t2 ;
cin>> t2.hr;
if (t.hr > t2.hr ) cout << "time 1 is max "<<endl;
else cout << "time 2 is max "<<endl;
*/
/* point2 t;
int n,m; cin>> n >>m;
t.set_x(n);
t.set_y(m);
n=t.get_x();
m=t.get_y();
point2 t2 ;
int n1,m1;cin>>n1>>m1 ;
t2.set_x(n1);
t2.set_y(m1);
n1=t2.get_x();
m1=t2.get_y();
if(n1>n) cout << "time 2 is max "<<endl;
else if(n1<n) cout << "time 1 is max "<<endl;
else {
if(m>m1) cout << "time 1 is max "<<endl;
else if(m<m1) cout << "time 2 is max "<<endl;
}
student st1,st2;
st1.set_name_id("ahmed",123);
st2.set_name_id("ali",124);
cout << "going to fun\n";
f(st1);
cout << "back from fun\n";
st1.display();*/
/*Dog d("roi",30);
d.set_name_wight("roi",30);
d.display();
cout << d.get_name()<<" " << d.get_wight() << endl;
/*std::vector<dog> dogs(6);
for (const dog& du : dogs)
{
du.display();
}*/
/*Distence d1(5,9),d2(5,7);
Distence d3 = d1 + d2;
Distence d4 = d1 - d2;
d1.display();
d2.display();
d3.display();
d4.display();*/
/* bankaccount a1(123,230.0),a2(1234,300.0),a3(12345,0),a4;
a4=a3;
a3=a1 - a2 ;
a3.set_accountnumber(a4.get_accountnumber());
a3.display();*/
dog baby("baby",10,"breed");
baby.displayinfo();
baby.sound();
animal dog1("dog1",15);
dog1.displayinfo();
dog1.sound();
return 0;
}